Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sgs1

macrumors newbie
Original poster
Jul 14, 2014
28
0
Hi everybody!

My web designer has developed an animation and gave me 15 jpg with the single step of this animation.
At the end, i have 2 buttons where i could push to go to another view.
Now: how i can import this animation in the same sequence? And how i can set two buttons?
 

xStep

macrumors 68020
Jan 28, 2003
2,031
143
Less lost in L.A.
You could create a loop that uses imageNamed: to load each image. Name them with sequence numbers to make life easier.

You may have to pass those through imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal to create a new image for each fetched image.

Take that list and create another image with
animatedImageWithImages:duration:.
 

sgs1

macrumors newbie
Original poster
Jul 14, 2014
28
0
You could create a loop that uses imageNamed: to load each image. Name them with sequence numbers to make life easier.

You may have to pass those through imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal to create a new image for each fetched image.

Take that list and create another image with
animatedImageWithImages:duration:.

Thanks for the reply. But if in the image i have an icon ...for example, an house ... how i can set a specific action when i press that icon?

For example: i push in the house and i open Safari...
 

xStep

macrumors 68020
Jan 28, 2003
2,031
143
Less lost in L.A.
For the button image, look at method setImage:forState:

To use the button, you learn about using targets and actions. The button is a subclass of the UIControl class that has the setup you need, addTarget:action:forControlEvents:
What I just hinted at is that when the class you're using does not have what you're looking for, consider that a super class of it may have the feature. Look up the inheritance chain before asking online.

Look at the openURL: method of the UIApplicaiton class to open Safari.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.