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

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.83 KB  |  hits: 12  |  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. ////////////////MainViewController.h
  2.  
  3. #import "GongViewController.h"
  4.  
  5. @interface MainViewController {
  6.  
  7. GongViewController *gongViewController;
  8.  
  9.  
  10. }
  11.  
  12.  
  13. ////////////////MainViewController.m
  14.  
  15. -(void)showGong {
  16.        
  17.        
  18.         gongViewController = [[GongViewController alloc] initWithNibName:@"GongViewController"bundle:[NSBundle mainBundle]];
  19.         [self presentModalViewController:gongViewController animated:YES];
  20.        
  21.        
  22. }
  23.  
  24.  
  25. //////////////// In GongViewController.m
  26.  
  27. - (void)viewDidLoad {
  28.         tabBar.view.frame = self.view.bounds;
  29.         [self.view addSubview:tabBar.view];
  30.     [super viewDidLoad];
  31. }
  32.  
  33.  
  34. ///////////////// In GongTableViewController.m (part of the tabBar view which is a subview to GongViewController)
  35.  
  36. -(void)home {
  37.        
  38.         [gongViewController removeFromSuperview]; // im getting error of it "gongViewController being undeclared
  39.  
  40.        
  41. }