YQPresentController 0.0.2

YQPresentController 0.0.2

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
Released最后发布2016年11月

yuyedaidao维护。



  • 作者
  • yuyedaidao

YQPrensetViewController

带导航的弹出视图控制器

使用说明

显示

  YQNavigationController *nav = [[YQNavigationController alloc] initWithSize:CGSizeMake(250, 300) rootViewController:nil];
  RootViewController *root = [[RootViewController alloc] init];
  nav.rootViewController = root;
  root.title = @"root";
  [nav show:YES animated:YES];

push&pod

 __weak typeof(self) my = self;
[self.navigationBar setLeftBlock:^{
    [my.yqNavigationController popYQViewControllerAnimated:YES];
}];

self.navigationBar.rightTitle = @"other";
[self.navigationBar setRightBlock:^{
    OtherViewController *other = [[OtherViewController alloc] init];
    [my.yqNavigationController pushYQViewController:other animated:YES];
}];

您要推出的新视图只需要继承YQViewController即可。

如果未设置导航栏左侧标题,导航栏将自动显示上一级视图控制器标题;默认显示“取消”。

如图

gif