ipad - Customized Animation in iphone -
i creating application have many customization. customization in sense, want give new application. in part of customization want add this kind of animation inside application.
i have searched on internet found many 3d animations. results not satisfy needs.
suggest me piece of code make animation possible.
if u provide source code, helpful me.
this want.set view this. _transitionframe label outlet.that label placed on display view.
include quartzcore framework , define method convert degree radians this
#import <quartzcore/quartzcore.h> #define degrees_to_radians(angle) ((angle) / 180.0 * m_pi)
in view did load method write following code.
- (void)viewdidload { cgrect preframe=_transitionframe.frame; preframe.origin.y+=preframe.size.height/2; [_transitionframe setframe:preframe]; [uiview beginanimations:nil context:nil]; catransform3d _3dt = catransform3drotate(_transitionframe.layer.transform,degrees_to_radians(90), 1.0, 0.0,0.0); [uiview setanimationrepeatautoreverses:yes]; [uiview setanimationrepeatcount:100]; [uiview setanimationduration:1]; [_transitionframe.layer setanchorpoint:cgpointmake(0.5, 1)]; _transitionframe.layer.transform=_3dt; [uiview commitanimations]; [super viewdidload]; // additional setup after loading view, typically nib. }
Comments
Post a Comment