我有一个像这样调用的事件:
[[NSNotificationCenter defaultCenter] postNotificationName:VIDEO_REQUESTED object:nil userInfo:dictionary];
当我在iPad设备或ipad模拟器上运行代码时,会调用事件方法。
然而,在iphone模拟器中,方法永远不会被调用,它会无声地失败。
调用的方法是这样的:
- (void)videoRequested:(NSNotification *) notification {
NSDictionary *dictionary = [notification userInfo];
NSString *stringValueToUse = [dictionary valueForKey:@"imgID"];
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
[self dismissViewControllerAnimated:YES completion:nil];
} else {
//
[self.popoverController dismissPopoverAnimated:YES];
}
[AdColony playVideoAdForZone:@"-" withDelegate:self withV4VCPrePopup:YES andV4VCPostPopup:YES];
}