This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 14th, 2012  |  syntax: None  |  size: 1.00 KB  |  views: 15  |  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. how to load UINavigationController from Uiviewcontroller
  2. @interface ContactUs : UIViewController {
  3.  
  4.     IBOutlet UIWindow *window;
  5.  
  6.     IBOutlet UINavigationController *navController;
  7.  
  8. }
  9.  
  10. @property (nonatomic,retain) IBOutlet UINavigationController *navController;
  11.  
  12. @end
  13.  
  14. and in implementation ..
  15.        
  16. // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
  17.  
  18.  -(void)viewDidLoad {
  19.  
  20.   [window addSubview:navController.view];
  21.  
  22.   [window makeKeyAndVisible];
  23.  
  24.     [super viewDidLoad];
  25.  
  26.  
  27.         NSLog(@":::::::::::::::::::");
  28.  
  29. }
  30.        
  31. @interface ContactUs : UINavigationViewController {
  32.  
  33.       IBOutlet UIWindow *window;
  34.  
  35.       IBOutlet UITextView *textView;
  36.       IBOutlet UIButton *button;
  37.  
  38.        }
  39.  
  40.    // Add properties to the all outlets //
  41.  
  42.      -(IBAction) buttonpressed: (id) sender;
  43.        
  44. @interface ContactUs : UINavigationViewController {
  45.  
  46.           IBOutlet UIWindow *window;
  47.  
  48.           // IBOutlet UINavigationController *navController; // You do not need this.
  49.  
  50.          }
clone this paste RAW Paste Data