Disabling user interaction of the current view on screen

前端 未结 7 712
一个人的身影
一个人的身影 2021-01-31 02:52

My app has many views and their respective controllers. Now I have a set of model classes with business logic in them. One of the model classes(subclass of NSObject) has the res

7条回答
  •  感情败类
    2021-01-31 03:31

    Here is the code for Swift 2.2 iOS 9.3

    UIApplication.sharedApplication().beginIgnoringInteractionEvents()
    UIApplication.sharedApplication().endIgnoringInteractionEvents()
    

    Use it frequently, work like champ for me, very useful for a view with many IBActions that make API call and you dont want to make another call in waiting for first response

提交回复
热议问题