First Kind
Catransition *transition = [catransition animation]; Transition.duration = 0.4f;//time transition.type = kcatransitionpush;//animation effect Transition.subtype = kcatransitionfrombottom;//animation Destination [Self.view addsubview:_backgroundview];//This is the thing to do is to add a view that needs to write on its own [Self.view.layer addanimation:transition forkey:@ "animation"];
The second Kind
[UIView beginanimations:@ "animation" context:nil]; [UIView setanimationduration:2.0f];//time [UIView setanimationcurve:uiviewanimationcurveeaseinout];//effect [ UIView setanimationtransition:uiviewanimationtransitionnone ForView:self.view Cache:yes]; [Self.view addsubview:_backgroundview];//to do [UIView commitanimations];
Third Kind
[UIView animatewithduration:1.0 animations:^{ _backgroundview.frame = CGRectMake (0, Originy, _screensize.width, 0 );//The status value to be reached }completion:^ (BOOL finished) { [_backgroundview Removefromsuperview]; }];
To summarize, the first second type of page switch with more, the third is generally a change in the state of a page.
Summary of how iOS animations are used