【问题标题】:What is the proper way to make options/settings view in iOS apps?在 iOS 应用程序中制作选项/设置视图的正确方法是什么?
【发布时间】:2017-03-02 10:05:42
【问题描述】:

在 iOS 应用中制作选项/设置视图的正确方法是什么:

  1. 使用UITableViewUICollectionView
  2. 实现静态表示、绘制单元格、分隔符、自定义手柄抽头等。
  3. 你的方式?

我需要的是加快该类型 UI 的视图创建。

【问题讨论】:

  • 它是通用的,这应该取决于您的需要。您可能希望在您的应用程序中构建一个设置场景作为表格视图,或者一个操作表就足以满足您的需求。
  • 这个问题离题了 - 它取决于应用程序并且主要基于意见
  • 更重要的是,根据设计,哪个东西最适合用户体验。

标签: ios swift uitableview uicollectionview comparison


【解决方案1】:

您可以将UIAlertViewController.actionSheet 样式一起使用。

示例:

let alertController = UIAlertController(title: nil, message: "Action for location", preferredStyle: .actionSheet)      

alertController.addAction(
    UIAlertAction(title: "One", style: .default) { action in
    // option clicked
})

//add more actions

present(alertController, animated: true, completion: nil)

外观:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-20
    • 1970-01-01
    • 2015-02-02
    • 2010-11-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多