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

質問編集履歴

7

追加

2019/04/07 10:59

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -17,6 +17,7 @@
17
17
  func tableView(_ table: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
18
18
  // セル生成
19
19
  let cell = table.dequeueReusableCell(withIdentifier: "chatCell", for: indexPath) as! ChatTableViewCell
20
+ let text = cell.viewWithTag(3) as! UITextView
20
21
 
21
22
  // paddingを消す
22
23
  text.textContainerInset = UIEdgeInsets.zero

6

説明追加

2019/04/07 10:59

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  return cell
33
33
  }
34
- // コメントアウト外すと1行になります
34
+ // コメントアウト外すと全て1行になります
35
35
  //func tableView(_ table: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
36
36
  // return 49
37
37
  //}

5

説明追加

2019/04/07 08:01

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  return cell
33
33
  }
34
-
34
+ // コメントアウト外すと1行になります
35
35
  //func tableView(_ table: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
36
36
  // return 49
37
37
  //}

4

コード

2019/04/07 08:01

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -32,9 +32,9 @@
32
32
  return cell
33
33
  }
34
34
 
35
- func tableView(_ table: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
35
+ //func tableView(_ table: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
36
- return 49
36
+ // return 49
37
- }
37
+ //}
38
38
 
39
39
  func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
40
40
  return 49 //自動設定

3

説明

2019/04/07 07:57

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -5,6 +5,7 @@
5
5
  ![イメージ説明](4fbb69c6ad5ab179dd4b81da4b4559c6.png)
6
6
 
7
7
  可変になるものとならないものがある
8
+ 1番最初の長文だけ長くなるが、それ以降のは全て1行になってしまう
8
9
  ![イメージ説明](69a73f0ba9c8d94395ee46dfd452cd27.png)
9
10
  ![イメージ説明](78ce5fd80295c5ac88a465ed82bce285.png)
10
11
 

2

画像追加

2019/04/07 07:54

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -4,10 +4,13 @@
4
4
  ![イメージ説明](58a353b23953d929166fef34df7bf64d.png)
5
5
  ![イメージ説明](4fbb69c6ad5ab179dd4b81da4b4559c6.png)
6
6
 
7
+ 可変になるものとならないものがある
7
8
  ![イメージ説明](69a73f0ba9c8d94395ee46dfd452cd27.png)
8
9
  ![イメージ説明](78ce5fd80295c5ac88a465ed82bce285.png)
9
10
 
10
- 可変にるものとならないものがあ
11
+ ぜか隙間があ
12
+ ![イメージ説明](fedfae3820f6db6205cc116c39e7ed0b.png)
13
+
11
14
  謎です。
12
15
  ```Swift
13
16
  func tableView(_ table: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

1

画像追加

2019/04/07 07:53

投稿

nakamu
nakamu

スコア82

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,14 @@
1
1
  [参照1](https://qiita.com/Tamucha/items/15faea4b3c58f9061ba7)
2
2
  [参照2](https://teratail.com/questions/113512)
3
3
 
4
+ ![イメージ説明](58a353b23953d929166fef34df7bf64d.png)
5
+ ![イメージ説明](4fbb69c6ad5ab179dd4b81da4b4559c6.png)
6
+
7
+ ![イメージ説明](69a73f0ba9c8d94395ee46dfd452cd27.png)
8
+ ![イメージ説明](78ce5fd80295c5ac88a465ed82bce285.png)
9
+
10
+ 可変になるものとならないものがある
11
+ 謎です。
4
12
  ```Swift
5
13
  func tableView(_ table: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
6
14
  // セル生成