(续)
this thread
)
Suppose that I have the following view created:
http://cl.ly/1USw/content
“视图”按钮应该是按下一个新的“视图控制器”,它将显示乔希或艾尔的所有照片,具体取决于按下的按钮。
我的问题是
:
In the ViewController code, how do I determine which 'View' button is pushed (top or bottom)?
This is the code that I have:
- (IBAction) viewImageList {
PhotoListViewController* photoListViewController = [[PhotoListViewController alloc]
initWithNibName:@"PhotoListViewController"
bundle:[NSBundle mainBundle]];
// here, I want to dynamically pass in the name (Josh or Al) based on which 'View' button is pressed
photoListViewController.ownerName = @"someName";
[[self navigationController] pushViewController:photoListViewController animated:YES];
[photoListViewController release];
}
Or if anyone have a different approach, I'd like to hear it :)