我在使用UIPopoverController
时收到警告,在阅读苹果文档后,我明白这是过时的,我们必须使用UIPopoverPresentationController
。请有人帮我替换下面的代码。UIPopoverController已弃用
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:viewDownloader];
[popover setPopoverContentSize: CGSizeMake(320, 450)];
在另一种方法
if (popover!=nil && popover.popoverVisible == YES)
[popover dismissPopoverAnimated:YES];
我需要更换这些代码,但找不到任何等价的。任何帮助赞赏。提前致谢 。
谷歌“UIPopoverPresentationController示例”,你会看到大量的教程。 –
使用UIPopoverPresentationController:https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPopoverPresentationController_class/ –