我正在使用此代码:
mediaLibraryPopover = [[UIPopoverController alloc]
initWithContentViewController:avc];
[self.mediaLibraryPopover presentPopoverFromRect:[theButton bounds]
inView:theButton
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
Run Code Online (Sandbox Code Playgroud)
我在Xcode 7中收到此警告:
不推荐使用UIPopoverController,在iOS 9.0中首先弃用 - 不推荐使用UIPopoverController.弹出窗口现在实现为UIViewController演示.使用UIModalPresentationPopover和UIPopoverPresentationController的模态表示样式.