I have an iOS application with several UITableViews in which everything works as intended, I am updating the application to handle iOS8
since then I have had a problem loading a custom cell into a table view, whose nib was in the ib checked 'use auto layout' field. Then I uncheck all of these checkboxes in my custom cell, and since then the cells of all my UITableViews not only do not call the pathSelectRowAtIndex method, but also do not stand out by touch.
I verify that all cells are active by adding
if(cell.userInteractionEnabled){NSLog(@"is enabled");}else{NSLog(@"is not enabled");}
all loaded cells write "included" in the log
I set the delegate and data source via ib in the storyboard, and all this worked before I changed the "use auto layout" and update to run on iOS 8.
what did I miss?
here is my code for creating cells
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"TableCellWithNumberCellIdentifier"; if( events.count>indexPath.row &&[[[events objectAtIndex:indexPath.row] objectForKey:@"tag"] integerValue] == -1) { EventsMonthSeparator *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell.translatesAutoresizingMaskIntoConstraints=NO; cell = (EventsMonthSeparator *)[EventsMonthSeparator cellFromNibNamed:@"EventsMonthSeparator"]; cell.date.text=[[events objectAtIndex:indexPath.row] objectForKey:@"date"]; [Functions setFontFamily:@"Neutra Display" forView:cell andSubView:YES]; if(cell.userInteractionEnabled){NSLog(@"is enabled");}else{NSLog(@"is not enabled");} } return cell; }else { eventsRow *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell.translatesAutoresizingMaskIntoConstraints=NO; cell = (eventsRow *)[eventsRow cellFromNibNamed:@"eventsRow"]; cell.description.text=[[events objectAtIndex:indexPath.row] objectForKey:@"name"]; cell.timedate.text=[[events objectAtIndex:indexPath.row]objectForKey:@"date"]; cell.image.image=[UIImage imageNamed:@"tiledrinks"]; cell.status.text=[Functions statusForIndex:[[[events objectAtIndex:indexPath.row] objectForKey:@"booked"] intValue]]; [Functions setFontFamily:@"Neutra Display" forView:cell andSubView:YES]; cell.tag=1; [cell setSelectionStyle:UITableViewCellSelectionStyleBlue]; if(cell.userInteractionEnabled){NSLog(@"is enabled");}else{NSLog(@"is not enabled");} } return cell; } }
source share