Set up a different CellIdentifier for your "special cell.
Up vote 1 down vote favorite share g+ share fb share tw.
I have a UITableView that is grouped into sections and has a number of rows in each section, all the rows are disabled so they only show information and they do not allow user interaction except for the very last row. But when the user scrolls through the table the last row is getting copied to some of the other rows in the table. Here is my code.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = tableView dequeueReusableCellWithIdentifier:CellIdentifier; cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier autorelease; cell. SelectionStyle = UITableViewCellSelectionStyleNone; cell. UserInteractionEnabled = NO; cell.
AccessoryType = UITableViewCellAccessoryNone; UIFont *textLabelFont = UIFont fontWithName: @"Arial" size: 13.0 ; UIFont *detailLabelFont = UIFont fontWithName:@"Arial" size:13.0; cell.textLabel. Font = textLabelFont; cell.detailTextLabel. Font = detailLabelFont; // Configure the cell.
PopulatePolicyCells ProcessPolicyCell:cell IndexPath:indexPath; if (indexPath. Section == 3){ tableView. AllowsSelection = YES; cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier autorelease; cell.
UserInteractionEnabled = YES; cell. AccessoryType = UITableViewCellAccessoryDisclosureIndicator; cell. SelectionStyle = UITableViewCellSelectionStyleBlue; cell.textLabel.
Text = @"Manage Policy"; } return cell; } Can anyone help? Iphone objective-c uitableview uitableviewcell link|improve this question edited Jan 24 at 14:56 asked Jan 24 at 14:43Popeye3749 96% accept rate.
Just an fyi, but I think an issue is also you are getting a cell with dequeueReusableCellWithIdentifier, then in the next line just creating a new one anyway. – John T Jan 24 at 17:12 Thanks I will remove it – Popeye Jan 25 at 17:07.
Set up a different CellIdentifier for your "special cell" - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell* cell = nil; if (indexPath. Section == 3) { cell = tableView dequeueReusableCellWithIdentifier:@"SpecialCell"; if(cell == nil) { tableView. AllowsSelection = YES; cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleDefault reuseIdentifier:"SpecialCell" autorelease; cell.
UserInteractionEnabled = YES; cell. AccessoryType = UITableViewCellAccessoryDisclosureIndicator; cell. SelectionStyle = UITableViewCellSelectionStyleBlue; } cell.textLabel.
Text = @"Manage Policy"; } else { cell = tableView dequeueReusableCellWithIdentifier:CellIdentifier; if (cell == nil) { cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier autorelease; cell. SelectionStyle = UITableViewCellSelectionStyleNone; cell. UserInteractionEnabled = NO; cell.
AccessoryType = UITableViewCellAccessoryNone; UIFont *textLabelFont = UIFont fontWithName: @"Arial" size: 13.0 ; UIFont *detailLabelFont = UIFont fontWithName:@"Arial" size:13.0; cell.textLabel. Font = textLabelFont; cell.detailTextLabel. Font = detailLabelFont; } // Configure the cell.
PopulatePolicyCells ProcessPolicyCell:cell IndexPath:indexPath; } return cell; }.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.