【发布时间】:2016-03-02 10:44:31
【问题描述】:
我刚刚在 IOS 中使用库 SWRevealViewController 创建了一个侧边菜单。当我点击侧边菜单图标时,我想为我的侧边菜单设置标题。
我尝试了下面的代码,但它不起作用。
#import "MenuViewController.h"
#import "SWRevealViewController.h"
@interface MenuViewController ()
@end
@implementation MenuViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"My test title";
这里的 MenuViewController 是 TableViewController 的子类
例如
【问题讨论】:
-
你检查你的 viewDidLoad 方法被调用了吗?
-
至少给你正在使用的第三方库的链接。通常,如果嵌入了导航控制器,
self.title将起作用。 -
不可能,我们需要定制。
-
@BadalShah -- 问题很简单,如何添加不嵌入navigationController的UItableviewController的标题
标签: ios objective-c swrevealviewcontroller