views:

27

answers:

2

Hello users,

does anybody know a solution that i could implement at this code, that the pictures could be touched and an event will be started?

- (void)viewDidLoad {
    [super viewDidLoad];

    // 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];
        [aktuellesImage release];       
    }
    [(AFOpenFlowView *)self.view setNumberOfImages:10];


}

I hope someone could help me and sorry for my bad english :)

+1  A: 

in AFOpenFlowView.m methods touchesBegan, touchMoves and touchEnded are already overriden, so just create a new delegate method for your usage and adapt these methods.

Benj
A: 

Sorry should i only create an new touchesBegan delegate method and that works? Maybe you could show an code sample for the definition of the method?

Thank you

Marco