我正在尝试以与苹果 map 应用程序相同的方式在操作表中添加分段控件。
我找到了一种在操作 TableView 中添加为 subview 的方法,但苹果不建议这样做。我在某处发现了以下评论。
You might want to be careful with this. Apple may not like it. From the documentation: "UIActionSheet is not designed to be subclassed, nor should you add views to its hierarchy. If you need to present a sheet with more customization than provided by the UIActionSheet API, you can create your own and present it modally with presentViewController:animated:completion:." – Eric Goldberg Mar 4 '14 at 2:28
谁能建议我实现这一目标的方法。
最佳答案
多年来,我也一直试图弄清楚这一点。线索在左下角——线条并没有一直延伸到左边缘。它实际上是一个 UITableView 并且行之间的间隙实际上是具有自定义大小的空白节标题。
我还没有完全实现它,但重要的是:
Presentation
至Over Current Context
Background
至Clear Color
Style
至Grouped
Segue
至Present Modally
关于ios - 操作表 IOS 中的分段控制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31586639/