ios - How do I apply an animation around a button? -


i have 30 sec of song being played when play button being played. want progress bar go around play button song being played. how this?

play = add[indexpath.row]     let playbutton : uibutton = uibutton.buttonwithtype(uibuttontype.custom) as! uibutton     playbutton.tag = indexpath.row     let imageret = "playbutton"     playbutton.setimage(uiimage(named: imageret), forstate: .normal)     playbutton.frame = cgrectmake(236, 20, 100, 100)     playbutton.addtarget(self,action: "playit:", forcontrolevents: uicontrolevents.touchupinside) 

i'm assuming want this:

enter image description here

it cashapelayer path circle. start strokeend of 0 , animate 1. can poll song's progress using nstimer at, say, 1-second intervals , calculate how of song has played, , set strokeend fraction.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -