gpt4 book ai didi

ios - 如何在 iOS 中将 UISearch 栏设置为 UiActionSheet?

转载 作者:行者123 更新时间:2023-11-28 21:24:32 24 4
gpt4 key购买 nike

我只是想知道在 iOS 应用程序中是否可以将 UISearchBarUISearchDisplayController 设置为 UIActionSheet

最佳答案

UIActionSheet 已弃用,它的替代品是 UIAlertController。不过,我认为我不会尝试在其上放置 UISearchBar。

我会使用一个常规的 UIViewController 并将 modalPresentationStyle 设置为 UIModalPresentationPopover,然后将其呈现为 popover使用其 popoverPresentationController property .此方法至少需要 iOS 8。

关于ios - 如何在 iOS 中将 UISearch 栏设置为 UiActionSheet?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38582383/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com