# YQPrensetViewController **Repository Path**: padding/YQPrensetViewController ## Basic Information - **Project Name**: YQPrensetViewController - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2014-09-10 - **Last Updated**: 2024-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README YQPrensetViewController ======================= ##带导航的弹出视图控制器 ###使用说明 #### 显示 YQNavigationController *nav = [[YQNavigationController alloc] initWithSize:CGSizeMake(250, 300) rootViewController:nil]; nav.touchSpaceHide = YES;//点击没有内容的地方消失 nav.panPopView = YES;//滑动返回上一层视图 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](https://github.com/yuyedaidao/YQPrensetViewController/blob/master/present.gif)