iOS swift - how to draw an ellipse with touch event -


currently trying port old windows phone app iphone. ui looks this:

enter image description here

i want know how following:

  1. draw solid ellipse on specific position, e.g. @ position x = 0, y = 0;
  2. the ellipse change color upon touch;
  3. 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

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -