When you say supervisor, I assume that you mean an animated view viewview. Apple's documentation is very non-specific regarding userInteractionEnabled , but I think that if you set it to false, it will disable touch events on a specific view, but not on its subview. I suggest you do it recursively. The following is an example of code that can be used to disable / enable all touch events in a view:
- (void)setInteraction:(BOOL)allow onView:(UIView *)aView { [aView setUserInteractionEnabled:allow]; for (UIView * v in [aView subviews]) { [self setInteraction:allow onView:v]; } }
You can then call this in your supervisor [self setInteraction:NO onView:[self superview]] . Of course, this will also disable your touch events, since you will disable them recursively in your supervisor. Of course, you can always activate your touch events [self setUserInteractionEnabled:NO] .
In addition, Apple 's UIView class reference indicates that some user interface components override this method:
Note : some UIKit subclasses override this property and return a different default value. See the documentation for any class that you use to determine if it returns a different value for this property.
source share