我刚刚使用 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的子类
例如
最佳答案
选择-1
在 TableviewConroller
中
on your indexpath (0) , set as your title
选择-2
remove the tableviewController and add one UIViewController and embed with tableView and UIlabel
-- UIViewController
-- UIlabel
--UITableview
关于ios - 如何将标题添加到侧边菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35744927/