码迷,mamicode.com
首页 > 其他好文 > 详细

使用Storyboard 创建ViewController

时间:2016-05-01 01:03:13      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

技术分享



#pragma mark --单元格点击方法

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

? ? DemoControl *arr = self.datalist[indexPath.row];

?? ?

? ? if (arr.ControlName == @"UIButton")

? ? {

? ? ? ? //navigation controller压入到栈中

? ? ? ? //UIButtonController *cButton =[[UIButtonController alloc] init];

? ? ? ? //[self.navigationController pushViewController:cButton animated:YES];

?? ? ? ?

?? ? ? ?

? ? ? ? //使用Storyboard种的布局,跟当前的Controller进行绑定

? ? ? ? UIStoryboard *storyboard=[UIStoryboardstoryboardWithName:@"Main"bundle:nil];

? ? ? ? UIButtonController *StButtonController=[storyboard instantiateViewControllerWithIdentifier:@"StButtonController"];

?? ? ? ?

? ? ? ? [self.navigationControllerpushViewController:StButtonController animated:YES];

? ? }

?? ?

}

使用Storyboard 创建ViewController

标签:

原文地址:http://www.cnblogs.com/kfsmqoo/p/5449804.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!