Note that there are some explanatory texts on larger screens.

plurals
  1. POModal View is Resetting My Existing View Controller
    text
    copied!<p>I load a view controller in my code using a segue in UIStoryboard. Based on a few user selected options, I then hide or show a UI control using an animation. It all works fine.</p> <pre><code>- (void)showComments { NSLog(@"Show Comments"); _commentsTextView.hidden = NO; _commentsTextView.frame = CGRectMake(435, 266, 475, 134); [UIView animateWithDuration:1 animations:^{ _commentsTextView.alpha = 1; _signatureButton.frame = CGRectMake(435, 420, 475, 134); _cancelButton.frame = CGRectMake(568, 581, 100, 44); _finishedButton.frame = CGRectMake(676, 581, 100, 44); }]; </code></pre> <p>}</p> <p>Then I am presenting a view controller created in UIStoryboard using the following code:</p> <pre><code> UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil]; SigningViewController *signingVC = (SigningViewController *)[storyboard instantiateViewControllerWithIdentifier:@"SigningViewController"]; signingVC.object = self; signingVC.signatureProperty = @"employeeSignature"; signingVC.startDate = self.startDate; signingVC.endDate = self.endDate; [self presentViewController:signingVC animated:YES completion:nil]; </code></pre> <p>When this code fires all happens as expected except for one thing: All the custom animations that hid or showed a UI control revert back. It is as if by calling the presentViewController method, it is redrawing my existing view from the UIStoryboard.</p> <p>Is there a way to get it to quit redrawing/reload my existing view from the Storyboard before displaying the new view modally?</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