views:

25

answers:

0

hi,

i have uiview "DummyView" and added two other views "StartView" and "ShowView" side-by-side into the DummyView.

When the app starts the StartView shows up. On this view is a UIButton, which triggers a translation animation to move the StartView to the left (out of the screen) and the ShowView into the Screen. On the ShowView, I have a UIScrollView.

After the translation animation I can't scroll through my UIScrollView any longer. Before moving StartView out of the screen it works perfectly (tested it).

Here's the code.

- (void)viewDidLoad {
    [super viewDidLoad];

    [button addTarget:self action:@selector(moveIt:) forControlEvents:UIControlEventTouchUpInside];
}


- (void)moveIt:(id)sender {
    NSLog(@"Move it!");

    [UIView beginAnimations:@"Move It" context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationBeginsFromCurrentState:YES];

    CGAffineTransform transform = CGAffineTransformMakeTranslation(-1024, 0);
    self.view.superview.transform = transform;

    [UIView setAnimationDelegate:self];
    [UIView commitAnimations];

}

Thanks for advice.