美文网首页
遇到的问题及解决方法

遇到的问题及解决方法

作者: 乐乐的熊 | 来源:发表于2017-11-17 01:34 被阅读13次

1.静态单元格的创建

1.1 首先静态单元格一定要在storyboard中创建,创建一个UITableViewController,xib不可以,因为该tableview的content值无法改为static cells。
1.2 当需要跳转到该界面时,需要实例化storyboard,然后获取该viewcontroller。

UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    AccountViewController *accVC = [sb instantiateViewControllerWithIdentifier:@"AccountViewController"];

1.3 当该viewController需要一个代码类来对应时,记的去storyboard中吧class属性填上,并且把该类中的自带的DataSource的代理删除掉。

相关文章

网友评论

      本文标题:遇到的问题及解决方法

      本文链接:https://www.haomeiwen.com/subject/neevhxtx.html