使用Storyboard 创建ViewController

NewImage



#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];

    }

    

}

posted @ 2016-05-01 00:17  kfsmqoo  阅读(898)  评论(0编辑  收藏  举报