0
커스텀 UITableViewCell을 사용하는 UITableView가 있습니다. 내 UITableVewCell에는 내 사용자 지정 UITableViewCell이있는 UITableView를 보유하고있는 주 ViewController에 태그를 추가 한 두 개의 텍스트 필드가 있습니다.커팅 소슬을 스크롤하는 방법 UIKeyboard 위의 UITextFieldCell
그래서 이것은 내부의 코드 내 tableView:cellForRowAIndexPath:
static NSString *CellIdentifier = @"Cell";
cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[CustomFCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
NSString *widthString = [currentFDictionary objectForKey:@"MM"];
if ((NSNull *) widthString != [NSNull null]) {
cell.widthTexField.text = widthString;
cell.widthTexField.tag = indexPath.row;
} else {
cell.widthTexField.text = @" ";
}
NSString *heightString = [currentFDictionary objectForKey:@"NM"];
if ((NSNull *) heightString != [NSNull null]) {
cell.heightTextField.text = heightString;
cell.heightTextField.tag = indexPath.row;
} else {
cell.heightTextField.text = @" ";
}
return cell;
그때 지금보기에 표시됩니다 UIKeyboard 위에있는 UITableViewCell 스크롤이
.tag
를 사용하는 방법을 알고 싶습니다
.
Anyhelp이 크게 감사 할 것입니다. 내가 생각할 수있는
입니다 :
자,이 방식으로
-textFieldShouldBeginEditing:
위임 방법을 사용 커스텀 셀 xib를 사용한다면'cell = [[CustomFCell alloc] initWithStyle : UITableViewCellStyleDefault reuseIdentifier : CellIdentifier];'작동하지 않는 것 같습니다 ... d 그것이 당신을 위해 일하는 oes? (그러나 이것은 주요 이슈가 아니라 단지 관찰 일뿐입니다.) – staticVoidMan