iOS swift - how to draw an ellipse with touch event -
currently trying port old windows phone app iphone. ui looks this:
i want know how following:
- draw solid ellipse on specific position, e.g. @ position x = 0, y = 0;
- the ellipse change color upon touch;
- touch position on screen, ellipse animated move specific position.
i tried several tutorial on how override drawrect in uiview, couldn't work, can provide simple sample?
thanks lot!
edit: sample code highly appreciated. there aren't swift code on internet , samples not easy find...
animating inside drawrect never recommended. why not put uiview on place want , animate coordinates of view?
the uiview custom view responding touch , triggering drawrect new color.
the parent view place these views on can respond touches , move ellipse view right position.
Comments
Post a Comment