思路:
通过获取textfield的父类来判定选中的是哪一行
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
NSIndexPath *myIndex = [_wifi_detali_tableView indexPathForCell:(UITableViewCell*)[[textField superview]superview]];
NSLog(@"MyIndex.row = %ld",myIndex.row);
[_wifi_detali_tableView selectRowAtIndexPath:myIndex animated:NO scrollPosition:UITableViewScrollPositionNone];
return YES;
}
本文介绍了一种方法,通过UITextField的父类来确定用户选择的具体表格视图行,并演示了如何使用NSIndexPath来选择对应的行。
43

被折叠的 条评论
为什么被折叠?



