开发者

passing an NSMutableArray to an other View

开发者 https://www.devze.com 2023-02-09 22:18 出处:网络
my problem is this I fill my Array开发者_运维问答 in my rootView and want to pass this Array to the mainView View.

my problem is this I fill my Array开发者_运维问答 in my rootView and want to pass this Array to the mainView View.

I tryed it this way:

mvController = [[mainViewController alloc] initWithNibName:@"mainViewController" bundle:[NSBundle mainBundle]];

mvController.listOfContent == self.listOfContent;
[self.navigationController pushViewController:mvController animated:YES];
mvController = nil;

[mvController release];

did I missed some thing?


In theory, it's correct, except because of the "release", that must be before "mvController = nil" (otherwise, you will be releasing "nil").

You must be more specific with your error, but probably the mistake regards using "listOfContent" inside viewDidLoad or init.

0

精彩评论

暂无评论...
验证码 换一张
取 消