並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 2 件 / 2件

新着順 人気順

tableviewの検索結果1 - 2 件 / 2件

  • デフォルトTableViewサンプル集 【操作編】(swift) - Qiita

    処理としては上記のようにフラグを true にするだけでできる。 選択したものにチェックマークをつけたい場合は下記も実装。 func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) // ここ cell.accessoryType = tableView.indexPathsForSelectedRows?.contains(indexPath) == true ? .checkmark : .none cell.selectionStyle = .none // 選択時に背景色を変えないため r

      デフォルトTableViewサンプル集 【操作編】(swift) - Qiita
    • デフォルトTableViewサンプル集(swift) - Qiita

      はじめに TableViewを使うときは毎回セルとかヘッダー・フッターのカスタムクラス作ったりしてたけどデフォルトのやつでも色々できるやん?ってことで色々作ってみました。 サンプル集 Cell Style AccessoryType Color Cell Selected Color TableViewControllerを使うか否か 画面にtableViewしか表示しないって場合は基本的には UITableViewController を使う方が便利なのでできるだけ UITableViewController を使います。 便利機能 tableViewのひも付けとかしなくてもいい var clearsSelectionOnViewWillAppear: Bool var refreshControl: UIRefreshControl? 編集モードの時に func setEditing(

        デフォルトTableViewサンプル集(swift) - Qiita
      1