demo issues
The demo has some unusual setups that will take to understand without proper commenting, so i thought to just ask. Why two back buttons on the detail view, and why does commenting one out or th other cause such erratic animation on the return to the main view?
And.. none of the buttons are hooked up, and my usual code techniques employed in many other apps to attach a tap gesture to a view are not working. A dropped button works but not the tap. I suspect your overlays may somehow be eating the tap (but then why does the button itself work?)
It is the animation that ruins the tap gestures. I have yet to figure out how to hook them properly but will report back when i figure it out.
I suspect Ramotion has this figured out, unless this demo is not in actual use anywhere.
Continuing my monologue: the opacityDuration() function sets the alpha from 0 to 1 but after animation, despite the view looking proper, the actual component's alpha is still zero. The code looks right in the repo, but somehow it is zero. I have tested this and the original demo icons (ie the "hert" icon view, and the alpha is indeed zero. Setting it manually to 1 at the end of animation allows the tap to work.
I will look into this further as time permits but for now will simply code around it.
So, augment showControlLabelDuration with:
, completion: { (finished: Bool) in print("done animation") //testing location to activate gestures // setupTapGestures only works if each involved imageview's alpha is set to none-zero. self.setupTapGestures() })
{and btw, I could have simply used UIButton which works fine as-is, but coders like the challenge of "why?" ;) }