이 내 예입니다 :이 같은 방법을 가지고 같은이 변수 Class 객체 선언을 가지고 추적 할 수없는 가망입니다
UITableView *cell = [[MyCustomClass alloc] init];
내가 제공자 라이선스 계약 "MyCustomClass을"변화 할 수 있음을 어떻게든지 그것을 할 수있는 방법이 있나요 :
-(NSObject*)newMethod:(int)intNumber{
classVariable = someClass depending on intNumber
UITableView *cell [[<<<classVariable>>> alloc] init];
return cell;
}
나는 내가 올바른 정의 세포를 만들 수 있습니다, 그리고 내 옆에 구현하는 글로벌 방법으로 그것을 사용하기 때문에이 방법을 원하는이 내가 여기에 유래 다른 질문 (사용 발견 사용하는 코드입니다 xib에서 사용자 정의 셀로드) :
이되는 모든 문제가이 실제로 내 친구도 원 -210
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:stringIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:nibName owner:self options:nil];
for (id currentObject in nib) {
if ([currentObject isKindOfClass:[UITableViewCell class]]) {
cell = (MyClassCell*) currentObject;
break;
}
}
cell = (MyClassCell *)[nib objectAtIndex:0];
}
내 목표는 내가 모든 정보를 요구 위의 코드를 전송하는 방법 느릅 나무을하는 것입니다, 느릅 나무는 tableViw, stringidentifier, nibName 및 MyClassCell <입니다 자신의 구현에 사용하기 위해이 문제를 해결하는 방법을 알고, 우리는 이것에 대한 단서에 대해 매우 감사 할 것입니다, 미리 감사드립니다!