0
많은 솔루션을 시도했지만 아무 것도 필요하지 않을 때 프로그래밍 방식으로 스토리 보드에서 UITextView를 옮길 것 같습니다.테이블 뷰 셀 내에서 프로그래밍 방식으로 스토리 보드의 UITextView를 이동
- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"cell";
Celleventmain *cellz = (Celleventmain *)[tv dequeueReusableCellWithIdentifier:MyIdentifier];
....
CGRect schedulesNewFrame = CGRectMake(cellz.labe.frame.origin.x,
cellz.labe.frame.origin.y + 200,
cellz.labe.frame.size.width,
cellz.labe.contentSize.height);
[cellz.labe setFrame: schedulesNewFrame];
return cellz;
}
작동 시키려면이 코드를 매우 조심해야합니다. 셀에 대한 UITextView의 프레임을 변경해야합니다. 테이블 셀의 경우 재사용됩니다. 즉, 아래로 스크롤하면 튀어 나온 첫 번째 셀이 재사용됩니다. origin.y는 이미 +200입니다. 따라서 y를 +200만큼 다시 시프트하면 +400이됩니다. 이렇게하면 프레임을 재설정하는 방법이 필요합니다. – LyricalPanda