iphone viewdidLoad运行以及参数的传递。
生活随笔
收集整理的這篇文章主要介紹了
iphone viewdidLoad运行以及参数的传递。
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題:?有三個view,他們之間傳遞一個NSArray *NodeArray
? ? ? ? ?IPadLoginViewController----》VedioContainerViewController-----》IpadTreeViewTestController
? 在?VedioContainerViewController的ViewDidLoad 中,若寫成如下代碼
? ? ? ? ?IpadTreeViewTestController *ipadTvtc = [[IpadTreeViewTestController alloc] init];
ipadTvtc.view.frame = CGRectMake(0, 0, 500, 1024);ipadTvtc.NodeArray = self.NodeArray;self.ipadTreeViewController = ipadTvtc;[self.view addSubview:self.ipadTreeViewController.view];[ipadTvtc release];?
結果發現 NodeArray傳遞到IpadTreeViewTestController時,其數組元素的個數為0;
?
但如果 寫成如下:
?
self.ipadTreeViewController = [[IpadTreeViewTestController alloc] init];self.ipadTreeViewController.NodeArray = self.NodeArray;[self.view addSubview:self.ipadTreeViewController.view];結果發現 NodeArray傳遞到IpadTreeViewTestController時,其數組元素的個數不為0;?
不知道這為什么??
?
總結
以上是生活随笔為你收集整理的iphone viewdidLoad运行以及参数的传递。的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 再谈js拖拽(一)
- 下一篇: mssql 2008恢复xp_cmdsh