1, using caanimation to achieve the push effect of the modal controller,
The Controller to display
Businesswebcontroller * Businessvc =[[Businesswebcontroller alloc] init];
/**
* The way of Addsubview
*/
[MAINVC Addchildviewcontroller:businessvc];
[Mainvc.view AddSubview:businessVC.view];
Addanimation (plus, add) on the layer of view
[MainVC.view.layer addanimation:transition Forkey:nil];
How to switch with the controller
[UIApplication Sharedapplication].keywindow.rootviewcontroller=businessvc; [UIApplication Sharedapplication].keywindow.backgroundcolor=[Uicolor Whitecolor];
Build a push effect animationcatransition*transition =[catransition animation]; Transition.duration=0.15; Transition.timingfunction=[Camediatimingfunction Functionwithname:kcamediatimingfunctiondefault]; Transition.type=Kcatransitionpush; Transition.subtype=Kcatransitionfromright; Transition.Delegate=Self ; [BusinessVC.view.layer addanimation:transition Forkey:nil];
iOS caanimation implementing a push effect display modal controller (Presentviewcontroller)