iOS 滑动UITableView,UITextField文字消
2018-11-22 本文已影响0人
布谷布谷7788
方法一:
由于方式造成的消失:可以将方法cellForRowAtIndexPath里面给为:
- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath{
NSString*identifier = [NSStringstringWithFormat:@"%ld%ld",(long)indexPath.section,(long)indexPath.row];
UITableViewCell*cell = [tableViewdequeueReusableCellWithIdentifier:identifier];
if(cell ==nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
}
return cell;
}
方式二: