[ad_1]
I’m attempting to recreate the round, 2-point draggable slider utilized by Apple within the Alarm -> Sleep/Wake Up display.
I’ve tried leveraging ZStack, Circle with .trim, .rotation and .gesture + Picture with .rotation and .gesture for the draggable factors, then some primary goniometric features to determine rotations of drag factors, and the draggable half between the drag factors (on this case sleep interval, between bedtime/wakeup factors).
Whereas making the drag factors + trimmed circle for the choice was pretty simple, I’m at present having 2 points:
-
The general efficiency is dangerous in comparison with Apple’s slider. Whereas theirs may be very fluid, mine is a bit laggy. Is there a strategy to debug what is likely to be inflicting it? I’m doing a little calculations on each DragGesture change, but it surely should not be something drastic.
-
I can not work out easy methods to obtain shifting the entire chosen interval. Dragging the bedtime/wakeup factors may be very simple, so is altering the trim of the circle that represents the sleep interval. However including DragGesture to the trimmed circle simply does not work as anticipated. I’m having a tough time wrapping my head round this.
Did you guys attempt recreating this view by any change? Any pattern code could be extremely appreciated.
[ad_2]

