Hey GUys,
so I'm trying to use iOS 5's new API's for containing children view controllers in a parent view. I got it working for simply UIViewControllers but I'm having some issues with a UITableViewController to show up properly.
In my storyboard I have a UIViewController which is my parent view controller. It has a UIView with an outlet hooked up where I want the child UITableViewController to go. I also have a separate scene which is a UITableViewController embedded in a navigation controller. In my viewDidLoad method in the Parent I call this code:
It shows the table view (currently empty) and can be scrolled, but it doesn't show me the Navigation Bar which has an Add button on it for adding new charges.
The functionality I'm looking to accomplish is to display a bunch of charges in the table view and somehow allow the user to add a new charge. I can't add a UIToolBar to the UITableViewController, so I thought if I embedded the view controller in a nav controller, it would let me see and use the nab bar, but it's not...
Any ideas how to either fix this or add the functionality I'm looking for?
Thanks
so I'm trying to use iOS 5's new API's for containing children view controllers in a parent view. I got it working for simply UIViewControllers but I'm having some issues with a UITableViewController to show up properly.
In my storyboard I have a UIViewController which is my parent view controller. It has a UIView with an outlet hooked up where I want the child UITableViewController to go. I also have a separate scene which is a UITableViewController embedded in a navigation controller. In my viewDidLoad method in the Parent I call this code:
Code:
ChargesTableViewController *chargesController = [storyboard instantiateViewControllerWithIdentifier:@"ChargesScene"];
chargesController.view.frame = self.chargesView.bounds;
self.chargesView.layer.cornerRadius = 15.0;
self.chargesView.layer.masksToBounds = YES;
[self.chargesView addSubview:chargesController.view];
[chargesController didMoveToParentViewController:self];
[self addChildViewController:chargesController];
It shows the table view (currently empty) and can be scrolled, but it doesn't show me the Navigation Bar which has an Add button on it for adding new charges.
The functionality I'm looking to accomplish is to display a bunch of charges in the table view and somehow allow the user to add a new charge. I can't add a UIToolBar to the UITableViewController, so I thought if I embedded the view controller in a nav controller, it would let me see and use the nab bar, but it's not...
Any ideas how to either fix this or add the functionality I'm looking for?
Thanks