UISplitViewController + UITabBarController - TabBar im LadscapeMode verstecken

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • UISplitViewController + UITabBarController - TabBar im LadscapeMode verstecken

    Hallo,

    Root VC ist ein SplitViewController der als Detail einen TabBarController enthält. Im Portraitmode übernimmt die TabBar die Navigation, im Landscapemode der Master-VC. Im Landscapemode muss die TabBar also ausgeblendet werden. Bei der vorherigen XIB Version der App war das kein Problem: Bei der Rotation in den Landscapemode wurde einfach die View des TabbarControllers um die Höhe der TabBar vergrößert. Die TabBar blieb am unteren Rand der View und lag somit außerhalb des Sichtbaren bereiches.

    Bei der Verwendung von AutoLayout und Storyboards funktioniert dies nun nicht mehr. Egal wie die Größe der TabBar View verändert wird, die TabBar bleibt am unteren Bildschirmrand und verschwindet also nicht.

    Verantwortlich sind offenbar die Contstraints die mit der Größenänderung der View kollidieren:

    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. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
    (
    "<NSLayoutConstraint:0x7c64b360 H:[UIView:0x7c64b240(607)]>",
    "<NSLayoutConstraint:0x7c64b960 H:[UIView:0x7c64b240]-(-8)-| (Names: '|':UIView:0x7c64afd0 )>",
    "<NSLayoutConstraint:0x7c64b990 H:|-(-15)-[UIView:0x7c64b240] (Names: '|':UIView:0x7c64afd0 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7c64f500 h=-&- v=-&- UIView:0x7c64afd0.width == UIViewControllerWrapperView:0x7c64ab40.width>",
    "<NSAutoresizingMaskLayoutConstraint:0x7c65a580 h=-&- v=-&- UIViewControllerWrapperView:0x7c64ab40.width == UITransitionView:0x7c447a40.width>",
    "<NSAutoresizingMaskLayoutConstraint:0x7c65ae20 h=-&- v=-&- UITransitionView:0x7c447a40.width == UILayoutContainerView:0x7c446740.width>",
    "<NSAutoresizingMaskLayoutConstraint:0x7c65b6c0 h=-&- v=-&- UILayoutContainerView:0x7c446740.width == UIView:0x7c44a270.width>",
    "<NSAutoresizingMaskLayoutConstraint:0x7c65c060 h=--& v=--& H:[UIView:0x7c44a270(768)]>"
    )

    Will attempt to recover by breaking constraint
    <NSLayoutConstraint:0x7c64b360 H:[UIView:0x7c64b240(607)]>


    Bei der Verwendung von XIBs hätte ich für einen einzelnen VC auswählen können, dass kein AutoLayout verwendet werden soll. Durch die Verwendung des Storyboards kann ich das aber nicht einzelen einstellen.

    Jemand eine Idee wie man das beheben könnte?