tableViewCell textField에 대한 올바른 프레임을 가져올 수없는 이유는 무엇입니까?TableViewCell의 UITextField 프레임
myCustomCell에는 leftDetailTF 및 rightDetailTF 텍스트 필드가 있습니다.
아래의 로그 문은 내가 탭하는 셀/텍스트 필드와 상관없이 동일한 rect 좌표를 생성합니다. LOG : 프레임 = {{(470), 1}, {200, 24}}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
myCustomCell *cell = (myCustomCell*)[tableView cellForRowAtIndexPath:indexPath];
NSLog(@"Frame = %@",NSStringFromCGRect(cell.rightDetailTF.frame));
call cellForRowAtIndexPath는 셀을 리빌드하거나 캐시 된 셀을 가져 오므로 원하는 것을 얻지 못합니다. 텍스트 필드를 배열에 기록하고 didselectRowAtIndexPath에서이를 호출 할 수 있습니다. – zt9788
try rectForRowAtIndexPath : – combinatorial
rightDetailsTF에 대한 rect가 필요합니다. rectForRowAtIndexPath는 셀에있는 텍스트 필드가 아닌 셀의 rect를 반환합니다. – vcirilli