images
This commit is contained in:
parent
a667866f0e
commit
44ef296817
|
@ -1,6 +1,13 @@
|
||||||
|
|
||||||
# SwiftUI Clock Time Picker
|
# SwiftUI Clock Time Picker
|
||||||
|
|
||||||
|
<p float="left">
|
||||||
|
<img src="Images/picture1.png" width="200" height="200" />
|
||||||
|
<img src="Images/picture3.png" width="200" height="200" />
|
||||||
|
<img src="Images/picture4.png" width="200" height="200" />
|
||||||
|
<img src="Images/picture5.png" width="200" height="200" />
|
||||||
|
</p>
|
||||||
|
|
||||||
## Clock with hands
|
## Clock with hands
|
||||||
|
|
||||||
**ClockTimePicker** is a SwiftUI view that displays a clock with the hour and minutes hands.
|
**ClockTimePicker** is a SwiftUI view that displays a clock with the hour and minutes hands.
|
||||||
|
|
|
@ -54,7 +54,7 @@ public struct ClockHand: View {
|
||||||
path.move(to: center)
|
path.move(to: center)
|
||||||
let length = self.handRatio * self.getRadius(geometry.size)
|
let length = self.handRatio * self.getRadius(geometry.size)
|
||||||
let theTip = self.getNewPoint(center, length)
|
let theTip = self.getNewPoint(center, length)
|
||||||
let handlePoint = self.getNewPoint(center, length-(length * 0.3))
|
let handlePoint = self.getNewPoint(center, length * 0.6)
|
||||||
path.addLine(to: theTip)
|
path.addLine(to: theTip)
|
||||||
// tricky business
|
// tricky business
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|
Loading…
Reference in New Issue