Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/109.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios PSCollectionView的故事板或xib_Ios_Iphone_Objective C_Uicollectionview - Fatal编程技术网

Ios PSCollectionView的故事板或xib

Ios PSCollectionView的故事板或xib,ios,iphone,objective-c,uicollectionview,Ios,Iphone,Objective C,Uicollectionview,在我的应用程序中,我将使用我在如何使用PSCollectionView中找到的PSCollectionView,但它没有解释是否需要创建故事板或xib文件。如果我必须创建故事板或xib,我应该实现哪个控制器? 谢谢自述文件说:它相当于UITableViewCell,而且您还有一个委托方法 - (UIView *)collectionView:(PSCollectionView *)collectionView cellForRowAtIndex:(NSInteger)index 对于普通的表视

在我的应用程序中,我将使用我在如何使用PSCollectionView中找到的PSCollectionView,但它没有解释是否需要创建故事板或xib文件。如果我必须创建故事板或xib,我应该实现哪个控制器?
谢谢

自述文件说:
它相当于UITableViewCell
,而且您还有一个委托方法

- (UIView *)collectionView:(PSCollectionView *)collectionView cellForRowAtIndex:(NSInteger)index
对于普通的表视图,将调用此方法来填充表。但正如您所看到的,此方法必须返回UIView。此视图可以通过编程进行编码,也可以在.xib文件中设计一个视图,并按如下方式加载:

NSArray *nibContent = [[NSBundle mainBundle] loadNibNamed:@"myCustomView" owner:self options:nil];
UIView *myView = (UIView*)[nibContent objectAtIndex:0];