0
plist에서 사용자 정의 셀로 이미지를로드하려고합니다. 모두 잘 작동하지만 이미지 뷰를 사용하여 앱을 실행하면 충돌이 발생합니다.UIImageView를 속성 목록 문자열로 채우는 방법
Cell.h :
@interface WineCell : UITableViewCell
@property (nonatomic, strong) IBOutlet UILabel *nameLabel;
@property (nonatomic, strong) IBOutlet UIImageView *bottleImageView;
@end
ViewController.m :
cell.nameLabel.text = [[wine libraryItemAtIndex:indexPath.row] valueForKey:@"Name"];
cell.bottleImageView.image = [[wine libraryItemAtIndex:indexPath.row] valueForKey:@"Image"];
충돌 리포트 :
2012-06-20 01 : 41 : 08.975 Appen에서 [3862 : F803] 수도 식별자가 "NOVAFORLAG.R-dvinsguiden"인 번들의 펜촉에서 참조 된 "병"이미지를로드하지 마십시오 2012-06-20 01 : 41 : 08.978 Rødvinsguiden [3862 : f803] - [__ NSCFString _isResizable] : 인식 할 수없는 sele ctor에 단지 이미지의 이름을 저장할 수 PLIST 파일로
cell.bottleImageView.image = [UIImage imageNamed:[[wine libraryItemAtIndex:indexPath.row] valueForKey:@"Image"]];
을 시도 예를 0x6d7b800
또는 당신은 (그러나 확실히 어떤 가장 좋은 방법) 이미지를 인코딩하고있는 NSData 거기에 넣어 수 있습니다. –
@JohanKool 예. – Kjuly