开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜