views:

13

answers:

0

I trying to put some images a videos inside a UIScrollView. If I scroll to the MediPlayer I can't change the position if the UIScrollView anymore. It is like the MoviePlayer takes all the swipe/touch events.

Is there any way to pass all swipes to the UIScrollView?

This is my code so far:

for (int i=0; i<[self.photoSet count]; i++) {

    if ([[self.photoSet objectAtIndex:i] isMemberOfClass:[UIImage class]]) {

        UIImageView *v = [[UIImageView alloc] init];
        v.frame = CGRectMake(i*480, 0, 480, 320);
        v.contentMode = UIViewContentModeScaleAspectFill;
        v.image = [self.photoSet objectAtIndex:i];
        [self.scrollView addSubview:v];
    } else {
        MPMoviePlayerController *m = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:[self.photoSet objectAtIndex:i]]];
        m.view.frame = CGRectMake(i*480, 0, 480, 320);
        m.view.contentMode = UIViewContentModeScaleAspectFill;
        [self.scrollView addSubview:m.view];
    }   
}