質問編集履歴
3
ソースコードの再修正。
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
-
|
49
|
+
//変更点有り
|
50
50
|
|
51
51
|
override func viewDidLoad() {
|
52
52
|
|
@@ -76,6 +76,8 @@
|
|
76
76
|
|
77
77
|
|
78
78
|
|
79
|
+
//変更点有り
|
80
|
+
|
79
81
|
override func viewDidLayoutSubviews() {
|
80
82
|
|
81
83
|
super.viewDidLayoutSubviews()
|
@@ -90,9 +92,7 @@
|
|
90
92
|
|
91
93
|
|
92
94
|
|
93
|
-
|
95
|
+
//変更点有り
|
94
|
-
|
95
|
-
|
96
96
|
|
97
97
|
fileprivate func createDarkGraph() {
|
98
98
|
|
@@ -210,8 +210,6 @@
|
|
210
210
|
|
211
211
|
}
|
212
212
|
|
213
|
-
|
214
|
-
|
215
213
|
override func didReceiveMemoryWarning() {
|
216
214
|
|
217
215
|
super.didReceiveMemoryWarning()
|
2
ソースコードの修正。
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,16 +56,16 @@
|
|
56
56
|
|
57
57
|
print(self.ecgGraph.bounds.height)
|
58
58
|
|
59
|
-
graphView = ScrollableGraphView(frame: self.view.frame)
|
59
|
+
// graphView = ScrollableGraphView(frame: self.view.frame)
|
60
|
-
|
60
|
+
|
61
|
-
graphView = createDarkGraph(self.view.frame)
|
61
|
+
// graphView = createDarkGraph(self.view.frame)
|
62
|
+
|
63
|
+
createDarkGraph()
|
62
64
|
|
63
65
|
|
64
66
|
|
65
67
|
graphView.set(data: data, withLabels: labels)
|
66
68
|
|
67
|
-
|
68
|
-
|
69
69
|
self.ecgGraph.clipsToBounds = true
|
70
70
|
|
71
71
|
self.ecgGraph.addSubview(graphView)
|
@@ -74,13 +74,29 @@
|
|
74
74
|
|
75
75
|
}
|
76
76
|
|
77
|
+
|
78
|
+
|
77
|
-
|
79
|
+
override func viewDidLayoutSubviews() {
|
80
|
+
|
78
|
-
|
81
|
+
super.viewDidLayoutSubviews()
|
82
|
+
|
79
|
-
|
83
|
+
//サイズ設定
|
84
|
+
|
80
|
-
|
85
|
+
let rect = CGRect(x:0, y:0, width:ecgGraph.frame.width, height:ecgGraph.frame.height) //Swift3.0
|
86
|
+
|
87
|
+
graphView.frame = rect
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
81
|
-
fileprivate func createDarkGraph(
|
97
|
+
fileprivate func createDarkGraph() {
|
82
|
-
|
98
|
+
|
83
|
-
let graphView = ScrollableGraphView(frame: frame)
|
99
|
+
// let graphView = ScrollableGraphView(frame: frame)
|
84
100
|
|
85
101
|
|
86
102
|
|
@@ -144,11 +160,11 @@
|
|
144
160
|
|
145
161
|
|
146
162
|
|
147
|
-
graphView.setNeedsDisplay()
|
163
|
+
// graphView.setNeedsDisplay()
|
164
|
+
|
148
|
-
|
165
|
+
return
|
149
|
-
|
150
|
-
|
166
|
+
|
151
|
-
return graphView
|
167
|
+
// return graphView
|
152
168
|
|
153
169
|
}
|
154
170
|
|
@@ -204,6 +220,10 @@
|
|
204
220
|
|
205
221
|
}
|
206
222
|
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
207
227
|
}
|
208
228
|
|
209
229
|
|
1
GithubのURLを有効にしました!
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
【開発フロー】
|
12
12
|
|
13
|
-
①Scrollable-GraphView
|
13
|
+
①[Scrollable-GraphView](https://github.com/philackm/Scrollable-GraphView)というライブラリを参照しコードを実装。
|
14
14
|
|
15
15
|
②clipsToBoundsを用いグラフのサイズを抑える。
|
16
16
|
|