IOS setUserInteractionEnabled not working
I have an instance of a UIViewController called SplashViewController. I
added this to the mainwindow in the AppDelegate like this:
splashViewController = [[SplashViewController
alloc]initWithNibName:@"SplashScreen" bundle:[NSBundle mainBundle]];
splashViewController.view.frame = [UIScreen mainScreen].bounds;
[self.window setBackgroundColor:[UIColor blackColor]];
self.window.frame=[UIScreen mainScreen].bounds;
window.rootViewController = splashViewController;
[window makeKeyAndVisible];
I have to handle touch events in the SplashViewController and I need to
turn the userInteractionEnabled YES and NO inside the program. For some
reason my code below have no effect
[self.view setUserInteractionEnabled=NO]; // YES also have no effect
Always fires my touchesBegan function no matter I set YES or NO above.
SplashViewController has an imageview with an image and a simple animation
in it.
Where else can I look for why userInteraction is not behaving the way I
want? I tried changing the values set in the Storyboard but no help
(anyway the program setting should override the Storyboard setting, I
guess).
Any help/pointer please...Thanks in advance
No comments:
Post a Comment