Xcode の Splitview テンプレートを見てください。すべての詳細ビュー コントローラsetDetailItem:
には、表示するオブジェクトを詳細ビューに伝えるメソッドがあります。したがって、詳細ビュー nib をロードsetDetailItem:
し、ポップオーバーで選択した行の配列要素内のオブジェクトと共に送信します。
アップデート:
さて、次のようなもの:
@property (nonatomic,retain) NSArray *imageNames;
@proprty NSUInteger currentImageIndex;
-(IBAction) nextItem{
if (self.currenImageIndex<[self.imageNames count]) {
self.currentImageIndex=self.currentImageIndex+1;
NSString * imageName = [NSString stringWithFormat:@"%@.jpg",[self.imageNames objectAtIndex:currentmageIndex]];
imageview.image = [UIImage imageNamed:imageName];
}
}
-(IBAction) previousItem{
if (self.currenImageIndex>0) {
self.currentImageIndex=self.currentImageIndex-1;
NSString * imageName = [NSString stringWithFormat:@"%@.jpg",[self.imageNames objectAtIndex:currentmageIndex]];
imageview.image = [UIImage imageNamed:imageName];
}
}