iphone - How to move several buttons throughout the screen -


i creating application have several buttons on screen , want make them move throughout screen. user can tap on buttons , buttons on user taps gets removed screen.hence have stop timer moves button.

but main concern how make bubbles move i.e. how manage each of them?

i have made use of nstimer.

nstimer* timer = [nstimer timerwithtimeinterval:1 target:self selector:@selector(movethebutton) userinfo:nil repeats:yes]; [[nsrunloop currentrunloop] addtimer:timer formode:nsrunloopcommonmodes];

but can helpful in case if have 1 button. if there more buttons quite hard manage timers.

also number of buttons dynamic.

please suggest alternate.

i have gone through few threads didnt got expected answer.

thanks in advance help.....

i suggest using caanimations move buttons. allow animate buttons smoothly without use of nstimers , ideal creating button animations dynamically.

caanimations created added views layer. can animate rotation, position , size of view using caanimations. easy add , remove animations views layer, making ideal dynamic content without headache of multiple nstimers.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -