I am trying to implement an Ipad application with gesture recognizer. In my application has some small UIView and each UIView has a sub view (UIButton). My need is,if click on a button ,the super view of this button’s user interaction option will become YES and the Others views userinteraction option will become NO. After implementing this, the super view over rule the sub view (i.e. if the user-interaction option of one view become NO,this will affect the sub view).How can avoid the above issue?
I am trying to implement an Ipad application with gesture recognizer. In my application
Share
Well, assuming you have a predefined number of views and subviews set-up in a storyboard or xib file you can add a property for each view. Then use the gesture recognizer to determine if the user taped a view. If they did you can use the properties you set up to set the appropriate views enabled property to YES or NO.
For example, add an IBAction to detect your gesture recognizer that does something similar to the following: