views:

13

answers:

0

Hello community,

I have implemented an CoverFlow with a button below. When i tap the button the App jump to the second view, and the picture that is active in the coverflow should be on the nex View: Here is the viewDidLoad of my CoverFlowViewController.m:

- (IBAction)goToChart {
    [rootViewController switchViews];
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
    UIButton *weiter = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    weiter.frame = CGRectMake(100, 400, 120, 40);
    [weiter addTarget:self action:@selector(goToChart) forControlEvents:UIControlEventTouchUpInside];
    NSString *ansicht = @"Weiter";
    [weiter setTitle:ansicht forState:UIControlStateNormal];
    [self.view addSubview:weiter];
    // loading images into the queue

    loadImagesOperationQueue = [[NSOperationQueue alloc] init];

    NSString *imageName;
    for (int i=0; i < 10; i++) {
        imageName = [[NSString alloc] initWithFormat:@"cover_%d.jpg", i];
        imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
        UIImage *aktuellesImage = imageView.image;
        UIImage *scaledImage = [aktuellesImage scaleToSize:CGSizeMake(100.0f, 100.0f)];
        [(AFOpenFlowView *)self.view setImage:scaledImage forIndex:i];
        [imageName release];
        NSLog(@"%d is the index",i);

    }
    [(AFOpenFlowView *)self.view setNumberOfImages:10];


}

I don't know to implement that the picture will be used for the next view, could someone help me, please?