質問編集履歴
5
加筆
title
CHANGED
File without changes
|
body
CHANGED
@@ -73,9 +73,5 @@
|
|
73
73
|
|
74
74
|
}
|
75
75
|
|
76
|
-
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
|
77
|
-
return 60
|
78
|
-
}
|
79
|
-
|
80
76
|
}
|
81
77
|
```
|
4
加筆
title
CHANGED
File without changes
|
body
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
}
|
75
75
|
|
76
76
|
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
|
77
|
-
return
|
77
|
+
return 60
|
78
78
|
}
|
79
79
|
|
80
80
|
}
|
3
加筆
title
CHANGED
File without changes
|
body
CHANGED
@@ -44,4 +44,38 @@
|
|
44
44
|
よろしくお願いします。
|
45
45
|
|
46
46
|
※バージョン
|
47
|
-
iOS8, Swift1.2
|
47
|
+
iOS8, Swift1.2
|
48
|
+
|
49
|
+
|
50
|
+
ーーーーーーーーーーーーーーーーーーーーーーーーーーーー
|
51
|
+
【追記】
|
52
|
+
Stripeさんへ
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
Stripeさんへ
|
57
|
+
|
58
|
+
```swift
|
59
|
+
import UIKit
|
60
|
+
|
61
|
+
class TestTableViewController: UIViewController, UITableViewDelegate, UITableViewDataSource{
|
62
|
+
|
63
|
+
var tableView = UITableView(frame: CGRectZero, style: .Grouped)
|
64
|
+
|
65
|
+
override func viewDidLoad() {
|
66
|
+
super.viewDidLoad()
|
67
|
+
let displayWidth = self.view.frame.width
|
68
|
+
let displayHeight = self.view.frame.height
|
69
|
+
|
70
|
+
tableView = UITableView(frame: CGRect(x:0, y:0, width:displayWidth, height:displayHeight))
|
71
|
+
tableView.estimatedRowHeight = 60
|
72
|
+
tableView.rowHeight = UITableViewAutomaticDimension
|
73
|
+
|
74
|
+
}
|
75
|
+
|
76
|
+
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
|
77
|
+
return 50
|
78
|
+
}
|
79
|
+
|
80
|
+
}
|
81
|
+
```
|
2
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
ーーーーーーーーーーーーーーー
|
12
12
|
UILabel①(高さ固定)
|
13
|
-
UIImage UILabel②(高さ
|
13
|
+
UIImage UILabel②(高さ可変)
|
14
14
|
UILabel③(高さ固定)
|
15
15
|
ーーーーーーーーーーーーーーー
|
16
16
|
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,9 +9,9 @@
|
|
9
9
|
UILabel②の高さによって、CellのHeightを動的に可変にしたいと思います。
|
10
10
|
|
11
11
|
ーーーーーーーーーーーーーーー
|
12
|
-
|
12
|
+
UILabel①(高さ固定)
|
13
13
|
UIImage UILabel②(高さ固定)
|
14
|
-
|
14
|
+
UILabel③(高さ固定)
|
15
15
|
ーーーーーーーーーーーーーーー
|
16
16
|
|
17
17
|
その上で、UILabel②に対して、下記のように設定した上で
|