个人认为最好的方式如下:一个viewController 载入 另一个,代码方法都可以写在各自文件中,不用做其他处理
KGModal * modal = [KGModalsharedInstance];
UserDetail * detailView = [[UserDetailalloc]init];
[[NSBundlemainBundle] loadNibNamed:@"UserDetail"owner:detailView options:nil];
detailView.name.text = [detailDatavalueForKey:@"name"];
detailView.realName.text = [detailDatavalueForKey:@"realName"];
detailView.position.text = [detailDatavalueForKey:@"position"];
detailView.permitStr =[detailDatavalueForKey:@"permit"];
[detailView dispalyPermit];
[modalshowWithContentView:detailView.viewandAnimated:YES];
普通载入方式,不能直接赋值
MoreView * more = [[MoreView alloc]init];
more.myView = more;
more.myNav = self.navigationController;
[[KGModal sharedInstance] showWithContentView:more.view andAnimated:YES];