0

I almost gave up to solve the auto layout problems in my today extension :-(.

I have a simple today extension for my iOS 8 app, where I want to display a quadratic photo and two text labels.

Thank you for help.

enter image description here

This is my actual layout. The view is almost displayed correct in the simulator and on my real iPhone, but I couldn't eliminate the auto layout error messages.

2015-01-09 21:12:31.099  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:0x7a379aa0 V:[UIButton:0x7a37a840'New Journal Entry'(38)]>",
"<NSLayoutConstraint:0x78f81680 UIButton:0x78f81310.width == 1.19111*UIButton:0x78f81310.height>",
"<NSLayoutConstraint:0x7a1846f0 UILabel:0x7a37c770'12. Oktober 2014 06:22'.leading == UIView:0x7a1743c0.leadingMargin + 10>",
"<NSLayoutConstraint:0x7a182580 V:[_UILayoutGuide:0x7a175960]-(8)-[UILabel:0x7a37c770'12. Oktober 2014 06:22']>",
"<NSLayoutConstraint:0x7a185400 UIView:0x7a1743c0.trailingMargin == UIButton:0x78f81310.trailing + 10>",
"<NSLayoutConstraint:0x7a17aff0 UIButton:0x78f81310.leading == UILabel:0x7a37c770'12. Oktober 2014 06:22'.leading>",
"<NSLayoutConstraint:0x7a17b020 UIButton:0x78f81310.top == UILabel:0x7a37c770'12. Oktober 2014 06:22'.top + 29>",
"<NSLayoutConstraint:0x7a17b9f0 V:[UIButton:0x78f81310]-(0)-[UIButton:0x7a37a840'New Journal Entry']>",
"<NSLayoutConstraint:0x7a17f780 V:[UIButton:0x7a37a840'New Journal Entry']-(0)-[_UILayoutGuide:0x7a17b690]>",
"<_UILayoutSupportConstraint:0x7a179c70 V:[_UILayoutGuide:0x7a175960(0)]>",
"<_UILayoutSupportConstraint:0x7a17ddf0 V:|-(0)-[_UILayoutGuide:0x7a175960]   (Names: '|':UIView:0x7a1743c0 )>",
"<_UILayoutSupportConstraint:0x7a17e0f0 V:[_UILayoutGuide:0x7a17b690(0)]>",
"<_UILayoutSupportConstraint:0x7a175000 _UILayoutGuide:0x7a17b690.bottom == UIView:0x7a1743c0.bottom>",
"<NSLayoutConstraint:0x78e4eee0 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7a1743c0(273)]>",
"<NSLayoutConstraint:0x78e4eeb0 'UIView-Encapsulated-Layout-Height' V:    [UIView:0x7a1743c0(529)]>"
)

Will attempt to recover by breaking constraint

ChaosSpeeder
  • 3,468
  • 5
  • 30
  • 38

1 Answers1

3

There is a bug on Apple's side when it comes to autolayout for a today extension. I have literally zero autolayout constraints, it's turned off, yet I still get "Unable to simultaneously satisfy constraints".

Mazyod
  • 22,319
  • 10
  • 92
  • 157