質問編集履歴

2

誤字

2017/03/16 02:34

投稿

takuntakun
takuntakun

スコア37

test CHANGED
File without changes
test CHANGED
@@ -27,71 +27,3 @@
27
27
 
28
28
 
29
29
  以下コードです
30
-
31
- ```swift
32
-
33
-
34
-
35
- func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
36
-
37
- let headerView:UIView = UIView()
38
-
39
- headerView.backgroundColor = UIColor.gray
40
-
41
-
42
-
43
- let scrollView:UIScrollView = UIScrollView()
44
-
45
- scrollView.backgroundColor = UIColor.yellow
46
-
47
- scrollView.translatesAutoresizingMaskIntoConstraints = false
48
-
49
- scrollView.isPagingEnabled = true
50
-
51
- headerView.addSubview(scrollView)
52
-
53
-
54
-
55
- scrollView.leadingAnchor.constraint(equalTo: headerView.leadingAnchor).isActive = true
56
-
57
- scrollView.topAnchor.constraint(equalTo: headerView.topAnchor, constant: 30).isActive = true
58
-
59
- scrollView.trailingAnchor.constraint(equalTo: headerView.trailingAnchor).isActive = true
60
-
61
- scrollView.bottomAnchor.constraint(equalTo: headerView.bottomAnchor, constant: -30).isActive = true
62
-
63
- scrollView.delegate = self
64
-
65
-
66
-
67
- let pageControl: UIPageControl = UIPageControl()
68
-
69
- pageControl.backgroundColor = UIColor.white
70
-
71
- pageControl.numberOfPages = num_card
72
-
73
- pageControl.pageIndicatorTintColor = UIColor.gray
74
-
75
- pageControl.currentPageIndicatorTintColor = UIColor.red
76
-
77
- headerView.addSubview(pageControl)
78
-
79
-
80
-
81
- pageControl.leadingAnchor.constraint(equalTo: headerView.leadingAnchor).isActive = true
82
-
83
- pageControl.trailingAnchor.constraint(equalTo: headerView.trailingAnchor).isActive = true
84
-
85
- pageControl.bottomAnchor.constraint(equalTo: headerView.bottomAnchor).isActive = true
86
-
87
- pageControl.heightAnchor.constraint(equalToConstant: 30).isActive = true
88
-
89
- pageControl.widthAnchor.constraint(equalToConstant: self.view.frame.width).isActive = true
90
-
91
-
92
-
93
- return headerView
94
-
95
- }
96
-
97
- ```

1

誤字

2017/03/16 02:34

投稿

takuntakun
takuntakun

スコア37

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- 全てコードで実装しているしているのでどの部分が間違っているのかを教えていただけると嬉しいです。
21
+ 全てコードで実装しているためどの部分が間違っているのかを教えていただけると嬉しいです。
22
22
 
23
23
 
24
24