Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom tableview cell with 6 imageviews
    primarykey
    data
    text
    <p>I have a very difficult problem. This is how my custom cell looks like.</p> <pre><code>|--------------------------------------------------------------------------| | | | | | Imageview1 Imageview2 Imageview3 Imageview4 imageview5 | | | | | | | |--------------------------------------------------------------------------| </code></pre> <p>I have a core database with 20 images. What I want to do is to fill up all these imageviews with my images. So at the and I should have 5 rows with in each imageview a different image.</p> <p>Here is my code for my cellforrowAtIndexpath</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } for(int i=0;i&lt;5;i++) { float xCoord = 0.0; Team *team = [self.fetchedResultsController objectAtIndexPath:indexPath]; NSData* imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:team.image]]; UIImage* image = [[UIImage alloc] initWithData:imageData]; UIImageView* imgView = [[UIImageView alloc] initWithImage:image]; [imgView setFrame:CGRectMake(xCoord,0,imgView.frame.size.width, imgView.frame.size.height)]; [cell.contentView addSubview:imgView]; xCoord += imgView.frame.size.width; } return cell; } </code></pre> <p>This is how far i got. I don't now how to fill up this tableview correctly. The other imageviews are name img_Player2,img_Player3,img_Player4,img_Player5.</p> <p>Can anybody help?</p> <p>Thank you</p> <p><strong>SCREENS WITH WHAT I WANT TO ACHIEVE</strong></p> <p><a href="http://www.flickr.com/photos/74322780@N08/8050170687/" rel="nofollow">This</a> is what I want to achieve:</p> <p>And at the moment I have <a href="http://www.flickr.com/photos/74322780@N08/8071984693/in/photostream" rel="nofollow">this</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload