`
caoyudong
  • 浏览: 25808 次
  • 性别: Icon_minigender_1
  • 来自: 扬州
社区版块
存档分类
最新评论

mm_drawerController 的实际使用

阅读更多
- (void)setupLeftMenuButton
{
    MMDrawerBarButtonItem * leftDrawerButton = [[MMDrawerBarButtonItem alloc] initWithTarget:self action:@selector(leftDrawerButtonPress:)];
    [self.navigationItem setLeftBarButtonItem:leftDrawerButton];
}

- (void)leftDrawerButtonPressid)sender
{
    [self.mm_drawerController toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil];//已抽屉的形式切换到左边的controller
}


-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row==0)
    {
            FocusBooksViewController *focusBook=[[FocusBooksViewController alloc]init];
            UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:focusBook];
       
            [self.mm_drawerController setCenterViewController:nav withCloseAnimation:YES completion:nil];
    }
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics