Note that there are some explanatory texts on larger screens.

plurals
  1. POAnimating two UIView subviews at the same time does not work
    text
    copied!<p>For some reason i am not able two animate two subviews postion. I have wrote the following</p> <pre><code>[self addChildViewController:self.photosViewController]; [self.photosViewController.view setFrame:CGRectMake(0, -self.view.frame.size.height, self.view.frame.size.width, self.view.frame.size.height)]; [self.view addSubview:self.photosViewController.view]; [UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{ [self.stepsView setFrame:CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, self.view.frame.size.height)]; [self.photosViewController.view setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; } completion:^(BOOL finished) { if (finished) { button.tag = 0; } }]; </code></pre> <p><code>self.stepsView</code> is an <code>IBOutlet</code> <code>UIView</code> and <code>self.photosViewController.view</code> is an child view controllers view that has been added to the view.</p> <p>With the current code only the <code>self.PhotosViewController.view</code> animates. However if i comment out the line where i add the child view controllers view as a <code>subview</code> then the <code>self.stepsView</code> animates correctly.</p> <p>Even if i add the child view controller and its view before this method is called the same error happens.</p> <p>Need help as i ran in to this a couple of months back with another app and had to do a dirty hack to get around it and now want to solve this.</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload