我们正在构建一个跨平台应用程序,我团队(苹果用户)的决策者希望我们所有的“选择删除”复选框都像“苹果邮件和消息应用程序”一样。

ios - 苹果的圆形复选标记-在哪里和何时使用?-LMLPHP
ios - 苹果的圆形复选标记-在哪里和何时使用?-LMLPHP

我个人觉得这很混乱,我认为它们看起来像单选按钮。他不赞成任何人会混淆圆形圆圈中的单选按钮。

苹果公司关于复选框的HIG并未明确指出复选框应为特定形状Apple's HIG on Checkboxes

Apple的示例代码显示方形复选框,但未选择删除项目Apple's TableViewCell Sample Code

所有iOS设备是否始终使用复选标记删除项目,还是这是一个新更改?

iOS在何时何地使用圆形复选标记?

最佳答案

圆形按钮是iOS表格视图的多种选择中的默认和标准,据我所知一直如此。您可以在"Buttons" page in Apple's iOS Human Interface Guidelines的第二个屏幕截图中看到这一点。试试下面的Swift示例代码,它调用UITableView的默认多选模式:

import UIKit

class ViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        tableView.allowsMultipleSelectionDuringEditing = true
        tableView.setEditing(true, animated: false)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{
        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell")
        cell?.textLabel?.text = String(indexPath.row)
        return cell!
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 15
    }
}


上面的代码生成此接口(在iPhone X iOS 11.3 Simulator上采用):

ios - 苹果的圆形复选标记-在哪里和何时使用?-LMLPHP

关于ios - 苹果的圆形复选标记-在哪里和何时使用?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49338683/

10-13 04:54