質問するログイン新規登録

回答編集履歴

2

修正

2018/06/11 03:06

投稿

退会済みユーザー
answer CHANGED
@@ -10,4 +10,7 @@
10
10
 
11
11
  ```
12
12
 
13
- なので、optionalをつけてみたらどうでしょうか?
13
+ ~~なので、optionalをつけてみたらどうでしょうか?~~
14
+
15
+ 単純に考えすぎでした。
16
+ https://tech.recruit-mp.co.jp/mobile/swift-optional-method/

1

修正

2018/06/11 03:06

投稿

退会済みユーザー
answer CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
7
7
 
8
- optional public func numberOfSections(in tableView: UITableView) -> Int // Default is 1 if not implemented
8
+ optional public func tableView(_ tableView: UITableView, sectionForSectionIndexTitle title: String, at index: Int) -> Int
9
9
  }
10
10
 
11
11
  ```