0
initWithFrame:reuseldentifer:
경고 메시지가 표시됩니다. 나는 이것이 무엇을 의미하는지 모른다. 오류없이이 문제를 어떻게 해결할 수 있습니까?UITableViewCell - initWithFrame : reuseldentifer : 더 이상 사용되지 않음
// If no cell is available, create a new one using the given identifier
if (cell == nil) {
cell = [[[ThreadSCell alloc] initWithFrame:CGRectMake(0,0,0,0) reuseIdentifier:CellIdentifier] autorelease];
cell.accessoryType = UITableViewCellAccessoryNone;
}
나는 this code을 사용하고 있습니다.
frame 매개 변수가 항상 무시 되었기 때문에 폐기 된 메서드가 정말 좋지 않았습니다. 너비는 테이블 뷰의 너비와 같고, 높이는 대리자에 의해 설정되고 원점은 테이블 뷰 자체에서 계산됩니다. API는 의미가 없기 때문에 API를 사용하지 않습니다. – Costique
로 변경하면 ... cell = [[[ThreadSCell alloc] initWithStyle : CGRectMake (0,0,0,0) reuseIdentifier : CellIdentifier] autorelease]; 오류가 나타납니다. – user1273250
@ user1273250 물론 스타일 매개 변수가 CGRect가 아니기 때문입니다. UITableViewCell 헤더 또는 클래스 참조에서 해당 메서드를 찾아 사용 방법을 이해해야합니다. – EmilioPelaez