经过一番搜索后,我找不到对许多人有用的答案。
有没有办法制作一个UIPopoverController
not当用户点击外部某处时关闭?我希望用户必须使用取消按钮(是的,我意识到这可能在某种程度上违反了 Apple 的 HIG,但这是一种罕见的情况,从用户体验的角度来看是有意义的)。
谢谢你的帮助。
只需设置modalInPopover
财产在UIViewController
正在显示在UIPopoverController
.
popover = [[UIPopoverController alloc] initWithContentViewController:content];
content.modalInPopover = YES;
[popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
意识到,从iOS5开始 https://stackoverflow.com/a/7818350/238387,你必须设置modalInPopover
代替-viewDidAppear
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)