Comment puis-je obtenir un UITableViewCell
par indexPath
? Comme ceci:Comment puis-je obtenir un uitableViewCell par indexPath?
J'utilise le UIActionSheet
, quand je clique confirme UIButton
Je veux changer le texte de cellule.
Le nowIndex Je définirais comme une propriété
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0)
{
NSInteger section = [nowIndex section];
NSInteger row = [nowIndex row];
NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
formatter.dateFormat = @"yyyy-MM-dd";
if (section == 0)
{
if (row == 0)
{
}
else if (row == 1)
{
UILabel *content = (UILabel *)[[(UITableView *)[actionSheet ] cellForRowAtIndexPath:nowIndex] viewWithTag:contentTag];
content.text = [formatter stringFromDate:checkInDate.date];
}
else if (row == 2)
{
}
}
}
}
salut david je réécris la question, pouvez-vous voir à nouveau – phpxiaoxin