initializing viewcontroller(piechartController) to viewcontroller's(covVC) variable
i am doing the following to initialize the viewcontroller(piechartController) to the viewcontroller's(covVC) variable like f开发者_运维知识库ollowing …is it right to change the view controller variable ?
  self.pie = [[ChatController alloc] initWithNibName:@"Chat" bundle:nil];
self.covVC = [[coverAssetController alloc] init];
self.covVC.pieObj = self.pie;
coverAssetController.h------>
 @interface coverAssetController : UIViewController {
    ChatController *pieObj;
 }
You need to add a property in your coverAssetController :
 @interface coverAssetController : UIViewController {
    PieChartController *pieObj;
 }
@property(nonatomic, assign) PieChartController *pieObj;
And in you implementation add :
@synthesize pieObj;
Anyway, it's ok to do it ^^ But in fact it depends what you want to do etc etc.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论