Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Hi all,

why am I getting warnings in my console about
Code:
<UIView: 0x7f9de124b4a0; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x7f9de124b570>>'s window is not equal to <UIAlertController: 0x7f9de123e1b0>'s view's window!

Code:
UIAlertViewController *myAlert = [UIAlertController alertControllerWithTitle: @"Error" message: @"You've entered an invalid port number!\nPlease review your entered information." preferredStyle:UIAlertControllerStyleAlert];
                UIAlertAction *cancelAction = [UIAlertAction
                                               actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action")
                                               style:UIAlertActionStyleCancel
                                               handler:^(UIAlertAction *action)
                                               {
                                                   NSLog(@"Cancel action");
                                               }];
                [myAlert addAction:cancelAction];
                [self presentViewController:myAlert animated:YES completion:nil];

Does this has to do with autoLayout or something? How can I fix this? It's really annoying
 
The answer is not in the code you show, which looks normal. It's not related to autoLayout. It's probably related to the other view in the warning message, which is a fullscreen view, not the alertController's views.

You are probably doing something illegal with segue's or how you're presenting other views or view controllers.

See this post for some related info

http://stackoverflow.com/questions/...nsive-after-presentviewcontrolleranimatedcomp
 
The answer is not in the code you show, which looks normal. It's not related to autoLayout. It's probably related to the other view in the warning message, which is a fullscreen view, not the alertController's views.

You are probably doing something illegal with segue's or how you're presenting other views or view controllers.

See this post for some related info

http://stackoverflow.com/questions/...nsive-after-presentviewcontrolleranimatedcomp

Hi PhoneyDeveloper,

I'm not doing anything strange with my seque as far as I'm aware.

Code:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"telnetConnection"]) {
        telnetConnectedView *destViewController = segue.destinationViewController;
        destViewController.tHost = connectionHost.text;
        destViewController.tPort = connectionPort.text;
        destViewController.tUser = connectionUsername.text;
        destViewController.tPass = connectionPassword.text;
        destViewController.tEnable = connectionEnable.text;
    }
}




.....


  if(error) {
    //alertviewcontroller
  } else {
    [self performSegueWithIdentifier: @"telnetConnection" sender: @""];
  }

Actually even when I'm not getting in the if(error) and I'm going to the new viewCOntroller I'm receiving this warning.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.