1
정적 인 tableview에 스토리 보드를 사용하고 있습니다. 모두 잘 작동합니다!Storyboard가있는 사용자 정의 된 정적 TableView - 셀 배경
이제 표보기 셀을 사용자 정의하고 싶습니다.
그래서 tableViewController를 추가하고 스토리 보드보기에 연결합니다. 여기 내가 사용자 정의 사용하고있는 코드입니다 :
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
UIColor *color = [[UIColor alloc] initWithRed:0.0 green:0.0 blue:0.0 alpha:0.0];
cell.detailTextLabel.backgroundColor = color;
cell.textLabel.backgroundColor = color;
cell.backgroundView = [ [UIImageView alloc] initWithImage:[ [UIImage imageNamed:@"cellbackground.png"] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0]];
cell.selectedBackgroundView = [ [UIImageView alloc] initWithImage:[ [UIImage imageNamed:@"cellbackground_down.png"] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0]];
return cell;
}
하지만 이제 응용 프로그램을 실행하는 경우,
몇 가지 좀 도와 줄래 ... 테이블 뷰는 비어 있고 더 정의 배경이 없다? =)Laurenz