質問編集履歴
7
追加
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
説明追加
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
説明追加
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
コード
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
|
-
|
36
|
+
// return 49
|
37
|
-
}
|
37
|
+
//}
|
38
38
|
|
39
39
|
func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
|
40
40
|
return 49 //自動設定
|
3
説明
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|

|
6
6
|
|
7
7
|
可変になるものとならないものがある
|
8
|
+
1番最初の長文だけ長くなるが、それ以降のは全て1行になってしまう
|
8
9
|

|
9
10
|

|
10
11
|
|
2
画像追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,10 +4,13 @@
|
|
4
4
|

|
5
5
|

|
6
6
|
|
7
|
+
可変になるものとならないものがある
|
7
8
|

|
8
9
|

|
9
10
|
|
10
|
-
|
11
|
+
なぜか隙間があく
|
12
|
+

|
13
|
+
|
11
14
|
謎です。
|
12
15
|
```Swift
|
13
16
|
func tableView(_ table: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
1
画像追加
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
|
+

|
5
|
+

|
6
|
+
|
7
|
+

|
8
|
+

|
9
|
+
|
10
|
+
可変になるものとならないものがある
|
11
|
+
謎です。
|
4
12
|
```Swift
|
5
13
|
func tableView(_ table: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
6
14
|
// セル生成
|