相关疑难解决方法(0)

如何修复"UIPopoverController已弃用"警告?

我正在使用此代码:

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的模态表示样式.

objective-c deprecated uipopovercontroller ios

49
推荐指数
2
解决办法
4万
查看次数