我使用的代码是:
mediaLibraryPopover = [[UIPopoverController alloc]
initWithContentViewController:avc];
[self.mediaLibraryPopover presentPopoverFromRect:[theButton bounds]
inView:theButton
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
我在Xcode 7中得到了这个警告:
UIPopoverController已弃用,iOS 9.0中第一个弃用-UIPopoverController已弃用.弹出框现在实现为UIViewController演示.使用UIModalPresentationPopover和UIPopoverPresentationController的模态表示样式.