Look at the Splitview templates in Xcode. The detail view controllers all have a setDetailItem:
method that tells the detail view which object it is supposed to display. So, you would just load the detail view nib and then send it setDetailItem:
with the object in array element of the chosen row in the popover.
Update:
Okay, then something like this:
@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];
}
}