일부 UITextField, UITextViews 및 UIImageViews를 하위보기로 UITableCell에 추가하고 있습니다. TextFields 또는 TextViews에 텍스트를 입력하고 테이블을 위 또는 아래로 스크롤 할 때 드로잉 문제가 발생합니다. 모든 두 번째 필드의 텍스트는 다음과 같이 다른 분야를 중복 : 하위 뷰iPhone SDK - UITableCell의 UITextField 하위 뷰에서 그리기 문제가 발생합니까?
self.formFields = [[NSArray alloc] initWithObjects:
[[UITextField alloc] initWithFrame:CGRectMake(18.0, 10.0, 284.0, 22.0)],
[[UITextView alloc] initWithFrame:CGRectMake(18.0, 8.0, 284.0, 140.0)],
[[UITextField alloc] initWithFrame:CGRectMake(18.0, 10.0, 284.0, 22.0)],
[[UITextField alloc] initWithFrame:CGRectMake(18.0, 10.0, 284.0, 22.0)],
[[UIImageView alloc] initWithFrame:CGRectMake(18.0, 18.0, 284.0, 284.0)],nil];
그리고 추가 :
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
...
[cell addSubview:[self.formFields objectAtIndex:indexPath.section]];
return cell;
}
을
alt text http://i49.tinypic.com/2gsl4dh.png
내가 이런 형태의 요소를 만드는거야 이 문제를 해결할 방법이 있습니까?