나는 UIImage
과 셀당 제목이 들어있는 UITableView
입니다. ALAssetsLibrary
을 통해 생성되는 그림의 경로가 포함 된 내 DB에서 이미지를 가져오고 있습니다. 문제는 내가 사진을 테이블에 포함시킬 때마다 셀을 선택할 수 없다는 것입니다. 어떤 도움도 감사 할 것입니다UITableView 셀을 선택하지 않습니다
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIndentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIndentifier];
if (!cell) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIndentifier];
}
Person *aPerson = [arrayOfPerson objectAtIndex:indexPath.row];
UIImage *background = [self cellBackgroundForRowAtIndexPath:indexPath];
UIImageView *cellBackgroundView = [[UIImageView alloc] initWithImage:background];
cellBackgroundView.image = background;
cell.backgroundView = cellBackgroundView;
UILabel *myLabel = (UILabel *) [cell viewWithTag:101];
myLabel.text = aPerson.title;
NSString *stPath = [NSString stringWithFormat:@"%@", aPerson.photo];
NSURL *urlNow = [NSURL URLWithString:stPath];
ALAssetsLibrary* assetslibrary = [[ALAssetsLibrary alloc] init];
[assetslibrary assetForURL:urlNow resultBlock:^(ALAsset *imageAsset) {
ALAssetRepresentation *r = [imageAsset defaultRepresentation];
UIImageView *myImageView = (UIImageView *)[cell viewWithTag:100];
myImageView.image = [UIImage imageWithCGImage: r.fullResolutionImage];
//[cell.contentView addSubview:myImageView];
[self.tableView reloadData];
} failureBlock:nil];
return cell;
"셀을 선택할 수 없음"이란 정확히 무엇을 의미합니까? didSelectRowAtIndexPath를 구현 했습니까? – Mike