Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding imageViews to next row of table view
    primarykey
    data
    text
    <p>in my app i have a table view and i am adding 4 image view to the first row of my table view .Now i want to add the image view to the next row.How can i do that in the existing code please help.I am posting my part of code:--</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = nil; static NSString *AutoCompleteRowIdentifier = @"AutoCompleteRowIdentifier"; cell = [tableView dequeueReusableCellWithIdentifier:AutoCompleteRowIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:AutoCompleteRowIdentifier] autorelease]; UIImageView * imageView1 = [[[UIImageView alloc] initWithFrame:CGRectMake(25, 4, 80, 80)] autorelease]; UIImageView * imageView2 = [[[UIImageView alloc] initWithFrame:CGRectMake(115,4,80, 80)] autorelease]; UIImageView * imageView3 = [[[UIImageView alloc] initWithFrame:CGRectMake(205,4, 80, 80)] autorelease]; UIImageView * imageView4 = [[[UIImageView alloc] initWithFrame:CGRectMake(295,4, 80, 80)] autorelease]; UIImageView * imageView5 = [[[UIImageView alloc] initWithFrame:CGRectMake(25, 4, 80, 80)] autorelease]; UIImageView * imageView6 = [[[UIImageView alloc] initWithFrame:CGRectMake(115,4,80, 80)] autorelease]; int j=0; imageView1.tag = j; imageView2.tag = j+1; imageView3.tag = j+2; imageView4.tag = j+3; imageView5.tag = j+4; imageView6.tag = j+5; [cell.contentView addSubview:imageView1]; [cell.contentView addSubview:imageView2]; [cell.contentView addSubview:imageView3]; [cell.contentView addSubview:imageView4]; [cell.contentView addSubview:imageView5]; [cell.contentView addSubview:imageView6]; } for ( int i = 1; i &lt;= j; i++ ) { imageView = (UIImageView *)[cell.contentView viewWithTag:i]; imageView.image = nil; } int photosInRow; if ( (indexPath.row &lt; [tableView numberOfRowsInSection:indexPath.section] - 1) || ([sentence count] % 4 == 0) ) { photosInRow = 4; } else { photosInRow = [sentence count] % 4; } for ( int i = 1; i &lt;=[sentence count]; i++ ){ imageView = (UIImageView *)[cell.contentView viewWithTag:i]; [self setImage1:imageView]; } return cell; } </code></pre> <p>I want mu imageView 5 and 6 to be in next row.Please help.How to do it?i am ramming my head against the wall looking for this.</p> <p>Thanks, Christy</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.
 

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