iPhone App doesn't pick up Touch events, after replacing one view with another
Any idea why after replacing one UIView with another (with the same Touch event logic), the 2nd one won't pick up any touch events?
I'm replacing them using:
[currentView remo开发者_运维知识库veFromSuperview]; NewView *newView = [[NewView alloc] init]; [window addSubview:newView];
Thank you all for your help :)
Is your NewView
class set up to receive touch events in the first place? ("User Interaction Enabled" checkbox set in Interface Builder, or, userInteractionEnabled
BOOL
property
set to YES
in UIView
)?
Is a UIView
below NewView
in your view hierarchy (i.e. a child of NewView
) consuming touch events in a touchesBegan:withEvent:
method?
精彩评论