扫码关注官方订阅号
iOS中之前的PopoverView实现下拉菜单,PopoverView已经被废弃,现在用什么写
光阴似箭催人老,日月如移越少年。
你说的应该是 UIPopoverController 吧,如果是的话,你可以用下面的方案替换 UIPopoverController:
1、present 一个 VC 时,用 UIModalPresentationPopover 这种样式,代码大致如下:
UIViewController *modalVC = [[UIViewController alloc] init]; modalVC.modalPresentationStyle = UIModalPresentationPopover; modalVC.popoverPresentationController.sourceView = self.view; [self presentViewController:modalVC animated:YES completion:nil];
2、使用 UIPopoverPresentationController。
希望对你有用。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你说的应该是 UIPopoverController 吧,如果是的话,你可以用下面的方案替换 UIPopoverController:
1、present 一个 VC 时,用 UIModalPresentationPopover 这种样式,代码大致如下:
2、使用 UIPopoverPresentationController。
希望对你有用。