我正在尝试在其中一个视图控制器中使用SEMasonryView,但是,网格视图不会填充我的自定义单元格,或者存在一个持续发生的线程错误。以下是我现在尝试使用的示例:
https://www.developergarden.com/en/marketplace/components/details/cmp/pinterest-grid-view-for-ios-masonry-view/
到目前为止,我已经提出了以下内容:
- (void)viewDidLoad
{
[super viewDidLoad];
SEMasonryView *masonryView = [[SEMasonryView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
masonryView.delegate = self;
masonryView.columnWidth = 256;
masonryView.pagingEnabled = YES;
[self.view addSubview:masonryView];
SEMasonryCell *cell = [[[NSBundle mainBundle] loadNibNamed:@"GridCell" owner:self options:nil] objectAtIndex: 0];
[self.masonryView addCell:cell];
}
由于某种原因,它只是不起作用。有没有人有这方面的例子或者更好的替代方案?