我已经使用故事板实现了我的 iphone 应用程序
在我的应用程序中*我需要将一个视图从一个视图呈现到另一个视图而不是 pus *h,
我在故事板 xib 中为第二个视图创建了一个屏幕。
我set up the connection for button in the first view to the second view with 'present
不吐。
现在i need to populate an array to the second view which was presented
我尝试了以下方法但没有成功
1:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(UIButton *)sender
{
//Populate detail to BuyView mail page
if ([segue.id
entifier isEqualToString:@"BuyView"])
{
BuyViewController *destViewController = segue.destinationViewController;
destViewController.itemDetailsArray = [_itemDetailsArray objectAtIndex:sender.tag] ;
}
}
2:
- (IBAction)buyItemClick:(UIButton *)sender
{
BuyViewController *destViewController = [[BuyViewController alloc] init];
destViewController.itemDetailsArray = [_itemDetailsArray objectAtIndex:sender.tag] ;
}