質問編集履歴

3

誤字

2017/03/16 02:34

投稿

takuntakun
takuntakun

スコア37

test CHANGED
File without changes
test CHANGED
@@ -18,66 +18,6 @@
18
18
 
19
19
 
20
20
 
21
- ```swift
22
-
23
- func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
24
-
25
- let headerView: UIView = UIView()
26
-
27
- headerView.backgroundColor = UIColor.gray
28
-
29
-
30
-
31
- let scrollView = UIScrollView()
32
-
33
- scrollView.backgroundColor = UIColor.yellow
34
-
35
- scrollView.translatesAutoresizingMaskIntoConstraints = false
36
-
37
- scrollView.isPagingEnabled = true
38
-
39
- headerView.addSubview(scrollView)
40
-
41
-
42
-
43
- scrollView.leadingAnchor.constraint(equalTo: headerView.leadingAnchor).isActive = true
44
-
45
- scrollView.topAnchor.constraint(equalTo: headerView.topAnchor, constant: 30).isActive = true
46
-
47
- scrollView.trailingAnchor.constraint(equalTo: headerView.trailingAnchor).isActive = true
48
-
49
- scrollView.bottomAnchor.constraint(equalTo: headerView.bottomAnchor, constant: -30).isActive = true
50
-
51
-
52
-
53
- let cardView: UIView = UIView()
54
-
55
- cardView.backgroundColor = UIColor.brown
56
-
57
- cardView.translatesAutoresizingMaskIntoConstraints = false
58
-
59
- scrollView.addSubview(cardView)
60
-
61
-
62
-
63
- cardView.leadingAnchor.constraint(equalTo: scrollView.leadingAnchor,constant: 10).isActive = true
64
-
65
- cardView.topAnchor.constraint(equalTo: scrollView.topAnchor).isActive = true
66
-
67
- cardView.trailingAnchor.constraint(equalTo: scrollView.trailingAnchor).isActive = true
68
-
69
- cardView.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: -10).isActive = true
70
-
71
-
72
-
73
- return headerView
74
-
75
- }
76
-
77
-
78
-
79
- ```
80
-
81
21
 
82
22
 
83
23
  こうした場合にcardViewがscrollviewの上に表示されて欲しのですが表示されません。なぜでしょうか?

2

改善

2017/03/16 02:34

投稿

takuntakun
takuntakun

スコア37

test CHANGED
@@ -1 +1 @@
1
- 横スクロル実装
1
+ Viewをコドで重ねる
test CHANGED
File without changes

1

誤字

2017/03/15 03:08

投稿

takuntakun
takuntakun

スコア37

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  ###やりたいこと
2
2
 
3
- tableのーに横スクロールを実装する
3
+ tableのーに横スクロールを実装する
4
4
 
5
5
 
6
6