0

Good Morning at all,

i have a big problem in the following code and no solution, so i hope someone could help me:

- (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];


}

So you can see there 10 Images in this CoverFlowView, but how could i find out the ACTUAL picture that is in front, to use this in another view??

Could someone help me, please?

Greetings Marco

Marco
  • 461
  • 1
  • 10
  • 22

1 Answers1

0
-(void)openFlowView: (AFOpenFlowView *)openFlowView imageSelected:(int)index
{
    AppDelegate_iPhone *appDelegate = (AppDelegate_iPhone *)[[UIApplication sharedApplication]delegate];

db_detail = (DB_data *)[self.GalleryArray objectAtIndex:index];


    appDelegate.Id = db_detail.Id;
//  NSLog(@"id: value is %d",db_detail.Id);
//  NSLog(@"Name vlaue is: %@",db_detail.Name);
    appDelegate.title = db_detail.Name;


    DetailMovieViewController *ViewController = [[DetailMovieViewController alloc]init];
    [self.navigationController pushViewController:ViewController animated:YES ];
    [ViewController release];

    [db_detail release];
} 
Faraz Haider
  • 128
  • 9