push segue between the view controllers
总之,要把第一个view加NavigationController
方便的可以这样
Editor > Embed In > Navigation Controller
也可以:
引用
NavigationController -> UIViewController (has PageControl, hold multiple pages, horizontally scrollable) -> UITableViewController (represents one list of news for one category), and when user clicks on a single news, gets DetailsViewController (instance of UIViewController).
if ([[segue identifier] isEqualToString:@"ShowTelegrafDetails"]){
TelegrafDetailsViewController *details = (TelegrafDetailsViewController*)segue.destinationViewController;
NSIndexPath *myIndexPath = [self.tableView indexPathForSelectedRow];
if([self isItPad])
details.linkFromTableView = [[otherNews objectAtIndex:myIndexPath.row] link];
else
details.linkFromTableView = [[[myViewController.itemMatrix objectAtIndex:[self calculateCurrentPage]] objectAtIndex:myIndexPath.row] link];
NSLog(@"%@",segue.sourceViewController);
NSLog(@"%@",segue.destinationViewController);
[self.myViewController.navigationController pushViewController:details animated:YES];
}
分享到:
相关推荐
swift简单的自定义tableViewCell实现
将tableView 作为 tableViewCell 放到另外一个tableView当中
swift ,使用autolayout + storyboard 最外层tableview列表,cell里面嵌套了tableview,自适应内容,cell里的tableview不可滑动,内容全部显示,且文字分行显示,不用设置cell的高度直接可以自适应内容
由于TableView是最常用的控件,所以封装起来方便使用
本 Demo 仿造了美团外卖和礼物说,分别实现了两个 TableView 之间和 TableView 与 CollectionView 之间的联动效果,效果见 gif 图。 【GitHub - OC版本】下载代码链接:https://github.com/leejayID/Linkage ...
购物车 两个tableView的联动 tableView和collectionView的联动
Ios简单的备忘录app,刚入门ios开发在网上看到了一个UITableView的使用例子便把网上的demo完善了一下功能,具体功能有: 添加一行数据,删除一行,修改一行,数据保存(重新启动app后数据还在),删除提示框(确认,取消). ...
iOS二级tabView,左右两个tableView,点左边,刷新右边
根据用户点击标题底下控制器来回切换,也可以拖动tableView来回切换。
两个tableview ,点击第一个tableview的内容然后第二个响应的发送改变内容
在一个View中显示两个tableView,要求使用statedictionary.plist中的数据,其中key作为左边的数据,每点击一个key,在右边的tableView中显示对应的号码列表,并且左边的tableView,前5行为一个分区(title显示top)...
一个控制器 多个tableview 最简单 易懂
多个TableView的关联
Qt Quick Control1中 从5.1版本开始就提供了表格控件,但是感觉不怎么好用,在Qt Quick Control2中 5.12版本开始又提供了一个专门用于做表格的控件TableView,相比于前面的方案,使用Tableview更加简单和直接。...
这是Qt中tableWidget和tableView的简单使用。
1、UITableViewTest主要在本地数据库获取了全国所有的地区,省,市的数据用列表的方式显示出来。 2、UITableView的section头显示地区。 3、省列表可以展开显示城市列表。实现了UITableView的嵌套显示。 4、...