I have the following code in my LibraryViewController
to enable iAd banner:
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
if (!self.canDisplayBannerAds) {
self.canDisplayBannerAds = YES;
}
}
iAd banner appears automatically at the bottom of the screen. I clicked the banner, ads appear fine. But when I close the ad, the app crashed with the following message:
[_UIViewControllerOneToOneTransitionContext isDescendantOfView:]: unrecognized selector sent to instance 0x166c6110
I have a mainViewController
that switches view. libraryViewController.view
is inserted as a subview at index 0
of the mainViewController.view
.
Any idea why this happens?
Thanks in advance.
I have changed to using a ADBannerView and it works. If I want to show ads on the inserted subview, it is better to use ADBannerView.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.