[英]SWRevealViewController - push next view controller storyboard
[英]push to next view by clicking on table cell with using storyboard
我有两个视图控制器FirstVC和SecondVC。 我在FirstVC有一个表格视图。 我只想通过单击FirstVC表视图的任何单元格来推动我对SecondVC的看法。 我正在使用故事板来观看这个视图。 我没有单独的NIB文件的视图。
谢谢你。
在FirstVC tableview委托中,
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
SecondVC *objSecondVC = [[SecondVC alloc] initWithNIBName: @"SecondVC" bundle: nil];
[self.navigationController pushViewController: objSecondVC animated: YES];
[objSecondVC release];
objSecondVC = nil;
}
请不要忘记将FirstVC标头中的SecondVC导入为
#import "SecondVC.h"
如果您正在使用故事板,则只需控制从tableview单元格单击并拖动到nextviewcontroller,然后从下拉列表中选择push。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.