Note that there are some explanatory texts on larger screens.

plurals
  1. POTable view Loaded automatically
    primarykey
    data
    text
    <p>I am using 8 cells in a <code>UITableView</code>. Each cell has a group of components like <code>UIButton</code>, <code>UILabel</code> and <code>UISlider</code>. When I update the 6th cell, it reflects to 1st <code>cell</code>. Similarly, if I update the 7th cell, it reflects to 2nd cell.</p> <p>How can I prevent this?</p> <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return viewcount; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *MyIdentifier=@"mycell"; ListCell1 *cell = (ListCell1 *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { cell = [[ListCell1 alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; UIButton *b=[buttonarray objectAtIndex:indexPath.row]; cell.imageView.frame=CGRectMake(0, 0, 0, 0); b.imageView.frame=CGRectMake(0, 0, 30, 30); cell.imageView.image=b.imageView.image; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; ListCell1 *cell1 = (ListCell1 *)[tableView cellForRowAtIndexPath:indexPath]; [cell1 addSubview:delbutton]; delpath=indexPath; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 100.0; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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