首页 > 其他 > 详细

使用Storyboard 创建ViewController

时间:2016-05-01 01:01:05      阅读:243      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!