Two ways to switch Uiviewcontroller 1.NavigationController
Method one right into
1 secondviewcontroller* svc=[[Secondviewcontroller alloc]init]; 2 [Self.navigationcontroller PUSHVIEWCONTROLLER:FVC Animated:yes];
Return to the previous
[Self.navigationcontroller Popviewcontrolleranimated:yes];
Another way to cut through the bottom
secondviewcontroller* svc=[[Secondviewcontroller alloc]init];[ Self.navigationcontroller presentmodalviewcontroller:svc Animated:yes];
Back to previous Uiviewcontroller
[Self.navigationcontroller Dismissmodalviewcontrolleranimated:yes];
2. If there is no navigation bar Navigationcontroller, you can also switch
secondviewcontroller* svc=[[Secondviewcontroller alloc]init];[ Self presentmodalviewcontroller:svc animated:yes];
Back to previous Uiviewcontroller
[Self dismissmodalviewcontrolleranimated:yes];
It can be set up in four modes of animation:
// Bottom-up default animated mode // gradient // flip Turn Half page // bottom up default animation mode
Third, is Uitabbarcontrller it is also inherited from the Uiviewcontroller, mainly to do with the parallel logic features of the viewcontroller between the switch.
The Uitabbarcontrller object has an attribute SelectedIndex, which sets the Viewcontroller that is displayed by default at the beginning.
Triggering a toggle when Tabbaritem is clicked will callback a method in Uitabbarcontrollerdelegate
-(void
iOS about switching between uiviewcontroller