我只是試圖調用方法與自定義UICollectionViewCell和它與SIGABRTUICollectionViewCell問題調用方法
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
if([_leaderboardDictionary count] > 0 && indexPath.row == 0)
{
return [self insertLeaderBoardCellAtIndexPath:indexPath];
}
else
{
return [self insertDetailGraphicCellAtIndexPath:indexPath];
}
}
-(CampaignDetailGraphic2Cell *)insertDetailGraphicCellAtIndexPath:(NSIndexPath *)indexPath
{
CampaignDetailGraphic2Cell *cell = (CampaignDetailGraphic2Cell *)[_topCollectionView dequeueReusableCellWithReuseIdentifier:@"detailWebCell" forIndexPath:indexPath];
if(cell == nil)
{
if(is3_5Inches)
{
cell = [[CampaignDetailGraphic2Cell alloc] initWithFrame:CGRectMake(0, 0, 300, 172)];
}
else
if(is4Inches)
{
cell = [[CampaignDetailGraphic2Cell alloc] initWithFrame:CGRectMake(0, 0, 300, 220)];
}
else
if(isIphone6)
{
cell = [[CampaignDetailGraphic2Cell alloc] initWithFrame:CGRectMake(0, 0, 355, 290)];
}
else
if(isIphone6Plus)
{
cell = [[CampaignDetailGraphic2Cell alloc] initWithFrame:CGRectMake(0, 0, 394, 356)];
}
}
[cell setupCell];
崩潰......
}
這個方法我CampaignDetailGraphic2Cell中存在類。
任何想法如何我可以調用方法和設置單元格的屬性...?
你在哪裏使這個小區?代碼,故事板,xib? – rdelmar 2014-10-31 20:31:26