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;
不知道这为什么?
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号