I have a UIViewController whose view is added to my UIWindow. However, if I remove the view, I cannot tap anything below where it was. My code is below:
-(void)createFullAd{
UIViewController *viewController = [UIViewController new];
self.fullAd = [MobclixFullScreenAdViewController new];
self.fullAd.delegate = self;
[self.fullAd requestAndDisplayAdFromViewController:viewController];
viewController.view.tag = 999999;
[[[[UIApplication sharedApplication] delegate]window] addSubview:viewController.view];
}
- (void)fullScreenAdViewControllerDidDismissAd:(MobclixFullScreenAdViewController*)fullScreenAdViewController{
NSLog(@"Dismissed");
[[[[[UIApplication sharedApplication] delegate] window] viewWithTag:999999]removeFromSuperview];
}
@dasblinkenlight gave me the idea for this, if he posts back I will award the answer to him.
This is messy but it is the only thing that has worked:
setNeedsLayoutis the key, but I called it on the window instead of the adController’s superview.