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

dbramhall

macrumors newbie
Original poster
Aug 1, 2011
16
0
England, UK
I am trying to make a UIView (or XIB) slide into view using the loadNibNamed method and I have that working fine however I would like to actual animate XIB coming into the view and thus I was wondering how one would do this.

Thanks in advance!
~Daniel
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
What kind of animation do you want? Alpha animation? frame animation?

You would normally set this up around the addSubview call. For the alpha animation set the alpha to 0 before the animation block, you could do this in the nib. Then inside the animation block set the alpha to 1. For the frame animation set the frame to something outside the animation block, maybe an offscreen potion. Then change the frame to the final position of the view inside the animation block.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.