tsalvo / nes-emu-ios

NES Emulator for iOS / iPadOS / macOS / tvOS, written in Swift
MIT License
134 stars 17 forks source link

constraint issue during rotation #90

Closed tsalvo closed 2 years ago

tsalvo commented 2 years ago

Constraint issue on iPhone SE 1st gen running iOS 15 during emulation:

Steps:

  1. begin in landscape mode
  2. connect a controller so that onscreen controls are hidden
  3. tap on the NES screen view so that the top navigation bar is hidden
  4. rotate from landscape to portrait.

no visible issue or crash occurred:

logs:

2021-10-23 20:53:05.784024-0700 nes-emu-ios[770:112532] [LayoutConstraints] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x280ff1950 UIStackView:0x137d20c70.width == 130   (active)>",
    "<NSLayoutConstraint:0x280ff1cc0 UIStackView:0x137d238a0.width == 130   (active)>",
    "<NSLayoutConstraint:0x280ff20d0 UILayoutGuide:0x2815fe060'UIViewSafeAreaLayoutGuide'.trailing == UIStackView:0x137d238a0.trailing   (active)>",
    "<NSLayoutConstraint:0x280ff2490 UIStackView:0x137d20c70.leading == UILayoutGuide:0x2815fe060'UIViewSafeAreaLayoutGuide'.leading + 4   (active)>",
    "<NSLayoutConstraint:0x280ff1a40 H:[UIView:0x137f2b350]-(>=30)-[UIStackView:0x137d238a0]   (active)>",
    "<NSLayoutConstraint:0x280ff19f0 H:[UIStackView:0x137d20c70]-(>=30)-[UIView:0x137f2b350]   (active)>",
    "<NSLayoutConstraint:0x280fdd860 'UIView-Encapsulated-Layout-Width' UIView:0x137d24e70.width == 320   (active)>",
    "<NSLayoutConstraint:0x280ff2170 'UIViewSafeAreaLayoutGuide-left' H:|-(0)-[UILayoutGuide:0x2815fe060'UIViewSafeAreaLayoutGuide'](LTR)   (active, names: '|':UIView:0x137d24e70 )>",
    "<NSLayoutConstraint:0x280ff2210 'UIViewSafeAreaLayoutGuide-right' H:[UILayoutGuide:0x2815fe060'UIViewSafeAreaLayoutGuide']-(0)-|(LTR)   (active, names: '|':UIView:0x137d24e70 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x280ff1cc0 UIStackView:0x137d238a0.width == 130   (active)>