Closed Phelthas closed 9 years ago
目前没有找到一个方法可以得到storyboard中的cell,除了连接接一个IBOutLet到controller中
你现在可以暂时用这个方法添加storyboard中的prototype cell,如果我找到更好的方法,会及时更改
-(void)addStoryBoardPrototypeCell:(UICollectionViewCell )prototypeCell withReuseIdentifier:(NSString )reuseIdentifier;
@AugustRush 谢谢! 这个貌似不管用呀,从storyBoard加载的cell是系统调用initWithCoder初始化的,我们能通过其他途径得到这个Cell来调用这个方法吗?
你说的对,这个不行的,不过我已经找到方法获取storyBoard中的cell了,马上会更新一个版本,这个问题应该没有了,你看下接下来的更新
你现在可以试试看,不用再调用任何的方法了
如果是用storyBoard指定的cellIdentifier,在storyBoard中画的cell(不是用xib),也就是说没有用到registerNIb或者registerClass的方法,那还能支持吗?