Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.63 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. switching between uiviewcontrollers without a UI navigator control
  2. vc1 = new viewc1();
  3.     window.AddSubview(vc1.View);
  4.     window.MakeKeyAndVisible ();
  5.        
  6. vc2 = new viewc2();
  7.     PresentModalViewController(vc2, true);
  8.        
  9. if(vc1==nil)
  10.   vc1 = new viewC1();
  11. window.addSubView(vc1.view);
  12. window.MakeKeyAndVisible ();
  13.        
  14. if(vc2==nil)
  15.    vc2 = new viewC2();
  16. if(vc1.view.superview!=nil){
  17.    vc1.view.removefromSuperView();
  18.    window.addsubview(vc2.view);
  19. } else {
  20.    vc2.view.removeFromSuperView();
  21.    window.addsubview(vc1.view);
  22. }
  23.        
  24. vc1.release();
  25. vc2.release();
  26.        
  27. navigationController.ViewControllers = new UIViewController[1]{ vc2 };