Hey Leute,
was ist denn an diesem Code falsch? Wenn ich den mit Instruments tracke bekomme ich Leaks.
Alles anzeigen
was ist denn an diesem Code falsch? Wenn ich den mit Instruments tracke bekomme ich Leaks.
Quellcode
- - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
- {
- NewsCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
- if(cell == nil)
- cell = [[NSBundle mainBundle] loadNibNamed:@"NewsCollectionViewCell" owner:self options:0][0];
- cell.mainLabel.text = [news[indexPath.row] valueForKey:@"pagetitle"];
- cell.subtitleLabel.text = ([((NSString *)[news[indexPath.row] valueForKey:@"introtext"]) isEqualToString:@""]) ? [StringHelper stringByStrippingHTML:((NSString *)[news[indexPath.row] valueForKey:@"content"])] : ((NSString *)[news[indexPath.row] valueForKey:@"introtext"]);
- cell.dateLabel.text = [NSString stringWithFormat:@"%@",[news[indexPath.row] valueForKey:@"publishedon"]];
- cell.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.9];
- return cell;
- }
