开发者

passing an NSMutableArray to an other 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜