Hello Users,
i have implemented two viewControllers:
CoverFlowViewController and ChartViewController
now i need an UIImage from CovverFlow.... in chartViewController,
this is my ChartViewController.h:
Code:
#import <UIKit/UIKit.h>
@class RootViewController;
@class CoverFlowViewController;
@interface ChartViewController : UIViewController {
RootViewController *rootViewController;
CoverFlowViewController *coverFlow;
}
@property (nonatomic, retain) RootViewController *rootViewController;
@property (nonatomic, retain) CoverFlowViewController *coverFlow;
- (IBAction) goToCoverFlow;
@end
and this is the method in ChartViewController.m where i need the UIImage:
Code:
- (void)viewDidLoad {
UIImage *img = coverFlow.imageView.image;
UIImageView *imageView = [[UIImageView alloc] initWithImage:img];
[self.view addSubview:imageView];
[super viewDidLoad];
}
But here in the first line coverFlow is 0x0, why?
Could anyone help me, please?