첫 번째 행에 uiwebview가 포함 된 tableview가 있습니다. 사용자가 단추를 클릭 할 때이 테이블의 webview 개체를 새 테이블로 변경하고 싶습니다. 아래 주어진 코드를 사용하고 있지만 잘 작동하지 않습니다. 이전 객체는 거기에 있고 새로운 객체는 웹 뷰를 다시 만들지 만 그 위에 있습니다. 어떻게 이전 셀을 셀에서 제거 할 수 있습니까? 셀이 표시 될 때업데이트 uitableview 셀 객체
덕분에 ...
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSLog(@"NİL.......");
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
} else {
NSLog(@"NOT NİL.......");
}
[cell addSubview:webView];
return cell;
}