【问题标题】:How to set UISearch bar to UiActionSheet in iOS?如何在 iOS 中将 UISearch 栏设置为 UiActionSheet?
【发布时间】:2016-07-26 06:23:19
【问题描述】:

我只是想知道在iOS App中是否可以将UISearchBarUISearchDisplayController设置为UIActionSheet

【问题讨论】:

    标签: ios objective-c uisearchbar uiactionsheet uisearchdisplaycontroller


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-05
      • 1970-01-01
      • 2015-07-05
      • 2014-08-31
      • 1970-01-01
      • 1970-01-01
      • 2011-12-21
      • 1970-01-01
      相关资源
      最近更新 更多