0

おはようございます。

次のコードに大きな問題があり、解決策がないので、誰かが私を助けてくれることを願っています:

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


}

したがって、この CoverFlowView には 10 個の画像が表示されますが、別のビューでこれを使用するために、前にある実際の画像をどのように見つけることができますか??

誰か助けてくれませんか?

こんにちはマルコ

4

1 に答える 1

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];
} 
于 2011-05-05T15:04:35.980 に答える