如何将标题添加到侧边菜单
how to add title to side menu
我刚刚使用 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 中的库 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