
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 0.83 KB | hits: 12 | expires: Never
////////////////MainViewController.h
#import "GongViewController.h"
@interface MainViewController {
GongViewController *gongViewController;
}
////////////////MainViewController.m
-(void)showGong {
gongViewController = [[GongViewController alloc] initWithNibName:@"GongViewController"bundle:[NSBundle mainBundle]];
[self presentModalViewController:gongViewController animated:YES];
}
//////////////// In GongViewController.m
- (void)viewDidLoad {
tabBar.view.frame = self.view.bounds;
[self.view addSubview:tabBar.view];
[super viewDidLoad];
}
///////////////// In GongTableViewController.m (part of the tabBar view which is a subview to GongViewController)
-(void)home {
[gongViewController removeFromSuperview]; // im getting error of it "gongViewController being undeclared
}