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 removeFromSuperview];
NewView *newView = [[NewView alloc] init];
[window addSubview:newView];
Thank you all for your help 🙂
Is your
NewViewclass set up to receive touch events in the first place? (“User Interaction Enabled” checkbox set in Interface Builder, or,userInteractionEnabledBOOLpropertyset toYESinUIView)?Is a
UIViewbelowNewViewin your view hierarchy (i.e. a child ofNewView) consuming touch events in atouchesBegan:withEvent:method?