您的位置:首页 > 产品设计 > UI/UE

获取到UITableView的cell

2016-07-29 11:33 302 查看
想要获取到tableView里的cell

for (int i = 0; i<rows-1; i++) {

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
UITextField *field = [_qiDiFaBuView.baseTable cellForRowAtIndexPath:indexPath].subviews[0];
UITableViewCell *myCell = [_qiDiFaBuView.baseTable cellForRowAtIndexPath:indexPath];
UITextField *field = myCell.subviews[0];
NSLog(@"%@",field);
NSLog(@"---%@",field.text);

if (field.text == nil) {

TYAlertView *alertView = [TYAlertView alertViewWithTitle:@"提示" message:@"请完整填写必须选项"];
[alertView addAction:[TYAlertAction actionWithTitle:@"确定" style:TYAlertActionStyleDefault handler:^(TYAlertAction *action) {}]];
TYAlertController *alerControl = [TYAlertController alertControllerWithAlertView:alertView preferredStyle:TYAlertControllerStyleAlert];
[self presentViewController:alerControl animated:YES completion:nil];

return;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: