Great post and examples.
I get an Autolayout warning when invoking the context menus and i see that it persists in your examples as well, any idea how to fix this?
ContextMenu[83574:2453262] [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.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x600002ff7070 h=--& v=--& UIInterfaceActionGroupView:0x7fa6d9c8dfa0.height == 0 (active)>",
"<NSLayoutConstraint:0x600002ffa620 groupView.actionsSequence....height >= 66 (active, names: groupView.actionsSequence...:0x7fa6da017000 )>",
"<NSLayoutConstraint:0x600002ffbcf0 UIInterfaceActionGroupView:0x7fa6d9c8dfa0.top == _UIContentConstraintsLayoutGuide:0x7fa6d9c8e200''.top (active)>",
"<NSLayoutConstraint:0x600002ffbb10 V:[_UIContentConstraintsLayoutGuide:0x7fa6d9c8e200'']-(0)-| (active, names: '|':UIInterfaceActionGroupView:0x7fa6d9c8dfa0 )>",
"<NSLayoutConstraint:0x600002ff9d60 groupView.actionsSequence....top == _UIContentConstraintsLayoutGuide:0x7fa6d9c8e200''.top (active, names: groupView.actionsSequence...:0x7fa6da017000 )>",
"<NSLayoutConstraint:0x600002ff8eb0 groupView.actionsSequence....bottom == _UIContentConstraintsLayoutGuide:0x7fa6d9c8e200''.bottom (active, names: groupView.actionsSequence...:0x7fa6da017000 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002ffa620 groupView.actionsSequence....height >= 66 (active, names: groupView.actionsSequence...:0x7fa6da017000 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.