storyboard跳转小记

简介: <p>TableVeiw或者CollectionView点击不同的cell跳转不同的界面的界面</p> <p><br></p> <p></p> <p style="margin-top:0px; margin-bottom:0px; font-size:11px; font-family:Menlo">-(<span style="color:#bb2ca2">void</span>

TableVeiw或者CollectionView点击不同的cell跳转不同的界面的界面


-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {

    if (indexPath.row == 0||indexPath.row==1) {

        VideoViewController *oneController = [[self storyboard]instantiateViewControllerWithIdentifier:@"shipin"];

        [[self navigationController] pushViewController:oneController animated:YES];

    } else {

        UserViewController *twoController = [[self storyboard]instantiateViewControllerWithIdentifier:@"men"];

        [[self navigationController] pushViewController:twoController animated:YES];

    }

    

}


其中,identifier是控制器的标识


目录
相关文章
|
1月前
|
移动开发 JavaScript 小程序
uView ActionSheet 操作菜单
uView ActionSheet 操作菜单
67 1
|
1月前
|
小程序
小程序页面顶部标题栏、导航栏navigationBar如何隐藏、变透明?
小程序页面顶部标题栏、导航栏navigationBar如何隐藏、变透明?
Xcode12在storyboard添加组件和事件,添加新页面及跳转
Xcode12界面有所改变,导致一些按钮位置变动。比如为storyboard添加组件的按钮移至如下位置:
1903 0
|
1月前
|
Android开发 计算机视觉 iOS开发
多页面悬停控件和如何获得多UIWindow的页面UIWindow
多页面悬停控件和如何获得多UIWindow的页面UIWindow
24 1
|
1月前
|
编译器 程序员 iOS开发
APP页面的三种基本实现方式:storyboard,xib,代码实现 与自动布局
APP页面的三种基本实现方式:storyboard,xib,代码实现 与自动布局
21 0
|
7月前
TabBar组件如何跳转页面?
TabBar组件如何跳转页面?
|
前端开发 Android开发
如何操作SAP UI5应用Footer区域工具栏按钮的背景颜色
如何操作SAP UI5应用Footer区域工具栏按钮的背景颜色
135 0
如何操作SAP UI5应用Footer区域工具栏按钮的背景颜色