UITabBarController does not appear in view
I have a UIView that is pushing a UITableViewController that is contained inside of a UITabBarController.
#import <UIKit/UIKit.h>
@interface ARViewController : UITableViewController<UITabBarControllerDelegate> {
IBOutlet UITabBarController* tabBarController;
}
@property(nonatomic,retain)IBOutlet UITabBarController* tabBarController;
@end
Here is my implementation
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to preserve selection between presentations.
self.clearsSelectionOnViewWillAppear = NO;
self.t开发者_运维知识库itle = @"AR";
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
tabBarController.delegate = self;
[self.view addSubview:tabBarController.view];
}
My UITabBarController is referenced to Files Owner. Why is it not appearing?
UITabBarController is always used as 'root controller'. Maybe you can try to use a root controller to contain a tableview. And it's not a common method to add a tabbar as a subview to a tableview.
精彩评论