Advertisement
Guest User

Untitled

a guest
Jun 14th, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement