Mit diesem Code auf iOS 7 Ergebnisse im Abscheider Sicht verdeckt oder verkürzt zu werden:UITableViewCellAccessoryCheckmark umfasst Zellseparator auf iOS 7
cell.accessoryType = UITableViewCellAccessoryCheckmark;
Wie kann ich den Separator Ansicht beheben?
Ich verwende Prototypzellen, aber ich untergliedere sie nicht.
[EDIT]
Hier ist der relevante Code aus cellForRowAtIndexPath:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];
if (indexPath.section == kDefaultViewSection){
NSArray *defaultViewNames = @[LQSettingsSentenceView, LQSettingsFullTextView, LQSettingsFlashcardsView];
NSString *preferredViewName = [LQSettings valueForKey:LQSettingsPreferredLessonView];
if ([defaultViewNames[indexPath.row] isEqualToString:preferredViewName]){
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (indexPath.section != kDefaultViewSection){
return;
}
// Just turn all checks off for a minute
for (int x=0; x<3; x++) {
NSIndexPath *ip = [NSIndexPath indexPathForRow:x inSection:kDefaultViewSection];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:ip];
cell.accessoryType = UITableViewCellAccessoryNone;
}
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
posieren Sie Ihre cellrowAtIndexPath und didselectedrow Methode – codercat
Sicher. Grundsätzlich macht was ich vorher gesagt habe. – arsenius
Entfernen Sie alte Teilansichten aus der Zelle, bevor Sie sie erneut verwenden? Etwas wie: if ([subview isKindOfClass: [UIView-Klasse]]) [subview removeFromSuperview]; – Sandeep