我有一个 Iphone 应用程序,我在其中将字符串从一个视图控制器传递到另一个视图控制器。我的字符串被添加为类中的属性。但是当我试图传递字符串时,它会因释放实例的消息而崩溃。(-[CFString retain]:发送到已释放实例的消息)。我的代码看起来像这样
RewardsViewController *rewards=[[ RewardsViewController alloc] initWithNibName:@" RewardsViewController" bundle:nil];
rewards.rewardsshopinfoname=stringshopname;
rewards.rewardsshopinfoaddress1=address1 ;
rewards.rewardsshopinfoaddress2=address2;
rewards.rewardsshopinfopoints=total;
rewards.rewardsarray=self.shoprewardsArray;
[self.navigationController pushViewController:rewards animated:YES];
有人可以帮我解决这个问题吗?