iOS:UIKit - UIPopoverVIew 中的图像/按钮/页面

标签 ios uikit popover

我有一些非常简单的问题,但很难找到它们的答案 ;)

图片来自 Apple 的 Numbers 应用:

图 1)

他们如何将这 4 个拆分放在 UIPopover 的顶部? 他们如何将 2 个拆分按钮(“2D/3D”)放入 UIPopover 中? 怎么可能有几 (6) 张图像作为可点击的项目?

最后一个问题:如何将所有这些与表格 View 混合 - “图表选项”似乎是一个表格 View 单元格。

图 2)

与第一个非常相似,有不同的图像可供选择,但这次它有多个页面,这正是我所需要的。复制这个的提示会很棒 :)

我只需要知道要查找什么 - 如何准确复制此布局。

enter image description here

enter image description here

最佳答案

在您的示例中,Apple 可能在 UIPopoverController 中使用了 UIViewController。然后他们可以执行您通常在 UIViewController 中执行的任何操作 - 例如添加您询问的 UISegmentedControl

关于如何将“开关”放入弹出窗口顶部的问题,Apple 可能将 View Controller 封装在 UINavigationController 中。然后,他们将导航栏的 titleView 属性设置为 UISegmentedControl

图片中的图像网格可能是一个 UICollectionView 与一个 UIScrollView 配对,并打开了 paging

Disclaimer:

I don't have any connection with the team at Apple that built Numbers, and therefore have only the app itself to infer what they did from. Unless someone from Apple steps forth and tells (which they won't), we don't know for sure what they did.

关于iOS:UIKit - UIPopoverVIew 中的图像/按钮/页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15960629/

相关文章:

ios - self.tableView.indexPathForCell(cell) 返回错误的单元格?

ios - 类型 'ViewController' 不符合协议(protocol) 'UISearchResultsUpdating'

ios - 调用completeTransition后调整导航栏 : in custom transition

iOS 8 - 使用自定义演示关闭 View Controller 后屏幕空白

ios - 如何为 iPad 创建来自屏幕底部的弹出框

ios - UITableView 滚动

ios - 在 JSQMessagesViewController 中实现消息传递状态

ios - 如何在中心显示具有自定义大小的模态视图 Controller ?

css - 修复了弹出窗口内容的位置

javascript - Vue : Delay option not working with v-popover