0
UITableView
의 단일 셀에 여러 이미지를 추가하려면 어떻게해야합니까?UITableView의 셀에 여러 이미지 추가
이미지를 사용하여 플레이어 상태를 표시하고 모든 플레이어가 동시에 여러 상태를 가질 수 있습니다.
UITableView
의 단일 셀에 여러 이미지를 추가하려면 어떻게해야합니까?UITableView의 셀에 여러 이미지 추가
이미지를 사용하여 플레이어 상태를 표시하고 모든 플레이어가 동시에 여러 상태를 가질 수 있습니다.
사용자 지정 셀을 만들기 위해 UITableViewCell
을 상속합니다. 그 MyCustomCell
라고합니다.
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
//change frame sizes to palce the image in the cell
UIImageView * thumbnail1 = [[UIImageView alloc] initWithFrame:CGRectMake(17, 12, 62, 62)];
thumbnail1.image = [UIImage imageNamed:@"Icon.png"];
[self addSubview:thumbnail1];
UIImageView * thumbnail2 = [[UIImageView alloc] initWithFrame:CGRectMake(17, 12, 62, 62)];
thumbnail2.image = [UIImage imageNamed:@"Icon.png"];
[self addSubview:thumbnail2];
UIImageView * thumbnail3 = [[UIImageView alloc] initWithFrame:CGRectMake(17, 12, 62, 62)];
thumbnail3.image = [UIImage imageNamed:@"Icon.png"];
[self addSubview:thumbnail3];
}
return self;
}
에 대해 다음과 같이 다른 사람이 –
내가 자습서를 발견 확인 [링크를 이해하는
당신은,
MyCustomCell
의 스타일로 초기화를 대체 할 수 아래처럼 사용 ] (http://www.icodeblog.com/2008/09/02/iphone-programming-tutorial-creating-a-todo-list-using-sqlite-part-2/) 감사합니다. –첫 번째 셀에 데이터가있는 경우 7 이미지가 있고 한 셀에 처음 세 개의 이미지를 표시하고 싶습니다. 세 번째 셀에 다른 세 개를 표시하고 세 번째 셀에 남아있는 이미지를 하나 하나 넣으려면 어떻게해야합니까? 거기에 어떤 해결책이 ...? – TheMall