I've a View Controller named as MasterViewController
having a tableView
implemented in it (as a part of my module). It contains following methods:
- (void)viewDidLoad
- (void)didReceiveMemoryWarning
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
Now I want to integrate my Module in My Main Project named as "myProject" having its view controller ViewController
.
How Can I init
my MasterViewController
in ViewController
i.e call its init
method. My current approach is only loading (void)viewDidLoad
method and showing empty table view in my ViewController
keeping in view that my MasterViewController
have an interface builder of storyboard
named as Main
My Approach:
MasterViewController* mainVC = [[MasterViewController alloc] init];
[self.view insertSubview:mainVC.view belowSubview:tabBar];