Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在iOS应用程序中设置选项/设置视图的正确方法是什么?_Ios_Swift_Uitableview_Uicollectionview_Comparison - Fatal编程技术网

在iOS应用程序中设置选项/设置视图的正确方法是什么?

在iOS应用程序中设置选项/设置视图的正确方法是什么?,ios,swift,uitableview,uicollectionview,comparison,Ios,Swift,Uitableview,Uicollectionview,Comparison,在iOS应用程序中设置选项/设置视图的正确方法是: 使用UITableView或UICollectionView 实现静态表示、绘制单元格、分隔符、自定义句柄点击等 你的方式 我需要的是加速该类型UI的视图创建 您可以与.actionSheet样式一起使用 示例: let alertController = UIAlertController(title: nil, message: "Action for location", preferredStyle: .actionSheet)

在iOS应用程序中设置选项/设置视图的正确方法是:

  • 使用
    UITableView
    UICollectionView
  • 实现静态表示、绘制单元格、分隔符、自定义句柄点击等
  • 你的方式
  • 我需要的是加速该类型UI的视图创建

    您可以与
    .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)
    
    外观:


    这是一种通用的,应该根据您的需要而定。您可能希望在应用程序中构建一个设置场景作为tableview,或者可能一个操作表就足以满足您的需要。这个问题是离题的-它取决于应用程序,主要是基于意见的。根据设计,这更多是最适合用户体验的事情。