
Untitled
By: a guest on
Jun 17th, 2012 | syntax:
None | size: 0.63 KB | hits: 19 | expires: Never
switching between uiviewcontrollers without a UI navigator control
vc1 = new viewc1();
window.AddSubview(vc1.View);
window.MakeKeyAndVisible ();
vc2 = new viewc2();
PresentModalViewController(vc2, true);
if(vc1==nil)
vc1 = new viewC1();
window.addSubView(vc1.view);
window.MakeKeyAndVisible ();
if(vc2==nil)
vc2 = new viewC2();
if(vc1.view.superview!=nil){
vc1.view.removefromSuperView();
window.addsubview(vc2.view);
} else {
vc2.view.removeFromSuperView();
window.addsubview(vc1.view);
}
vc1.release();
vc2.release();
navigationController.ViewControllers = new UIViewController[1]{ vc2 };