回答編集履歴
2
セットするところが漏れてたので追記します。
test
CHANGED
@@ -32,4 +32,22 @@
|
|
32
32
|
|
33
33
|
scrollView.contentSize = CGSize(width: 500, height: tabBarHeight)
|
34
34
|
|
35
|
+
|
36
|
+
|
37
|
+
・・・(中略、質問のタブバー記述を参考ください)・・・
|
38
|
+
|
39
|
+
scrollView.delegate = self as? UIScrollViewDelegate
|
40
|
+
|
41
|
+
myTabBar.delegate = self as UITabBarDelegate
|
42
|
+
|
43
|
+
myTabBar.selectedItem = tab3
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
// ScrollViewの中身を作る
|
48
|
+
|
49
|
+
scrollView.addSubview(myTabBar)
|
50
|
+
|
51
|
+
self.view.addSubview(scrollView)
|
52
|
+
|
35
53
|
```
|
1
scrollView\.frameの値が意図した値と違ってたので更新します
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
//scrollView.center = self.view.center
|
28
28
|
|
29
|
-
scrollView.frame = CGRect(x:
|
29
|
+
scrollView.frame = CGRect(x:25,y:20,width:width,height:tabBarHeight)
|
30
30
|
|
31
31
|
// 中身の大きさを設定
|
32
32
|
|