UITableViewを拡張した「 EasyTableView 」を使用しています。私は以下のような問題に遭遇します:
- (void)viewDidLoad
{
NSArray *array = [[NSArray alloc] initWithObjects:@"14.jpg",nil];
photos = array;
[array release];
[photos objectAtIndex:0]; //this "photos" can be access
}
しかし、delegateメソッドで「写真」にアクセスしようとすると:
- (void)easyTableView:(EasyTableView *)easyTableView setDataForView:(UIView *)view forIndexPath:(NSIndexPath *)indexPath {
NSInteger r = [indexPath row]; // r = 0
NSString *imagePath = [photos objectAtIndex:r]; //this line cause : reason: '-[CALayer objectAtIndex:]: unrecognized selector sent to instance
}
写真にアクセスする結果が異なるのはなぜですか?どうすれば修正できますか?