Unable to simultaneously satisfy constraints - No constraints in place

前端 未结 10 2011
野的像风
野的像风 2020-11-28 02:36

I have gone through and removed every single user constraint yet I am still getting the following error ONLY after I rotate the device. I have absolutely no

10条回答
  •  离开以前
    2020-11-28 03:23

    I had this problem and took me 2 days to figure out the source of the problem....

    If you open a storyboard programmatically in you code just make sure you do it like this:

    UIStoryboard *story = [UIStoryboard storyboardWithName:@"MovieMaker" bundle:nil];
        UIViewController *vc = [story instantiateInitialViewController];
        //this causes layout to break [self presentViewController:vc animated:YES completion:nil];
        [self showViewController:vc sender:nil];
    

    I was using the commented line (using presentViewController) and the orientation bug has happening throwing constraints conflicts that weren't my constraints... changing to showViewController all constraints conflicts were gone and orientation works...... (I don't really know why it works with show and not present... still thinking it's... ALIENS...)

提交回复
热议问题