nudj / nudj-ios

Nudj - iOS App (Archive)
0 stars 0 forks source link

Long job description breaks layout #137

Open richardbuckle opened 8 years ago

richardbuckle commented 8 years ago

If the message description is very long, autolayout of the detailed job view breaks and it cannot be scrolled.

richardbuckle commented 8 years ago

simulator screen shot 19 jul 2016 16 47 56

richardbuckle commented 8 years ago

Debugger output:

2016-07-19 16:47:40.676 Nudj[8925:78830] 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. 
(
    "<_UILayoutSupportConstraint:0x7fe310984dd0 V:[_UILayoutGuide:0x7fe310de5fd0(64)]>",
    "<_UILayoutSupportConstraint:0x7fe30d27e140 V:|-(0)-[_UILayoutGuide:0x7fe310de5fd0]   (Names: '|':UIView:0x7fe30d2560a0 )>",
    "<_UILayoutSupportConstraint:0x7fe310d13750 V:[_UILayoutGuide:0x7fe310ddc2e0(0)]>",
    "<_UILayoutSupportConstraint:0x7fe310966850 _UILayoutGuide:0x7fe310ddc2e0.bottom == UIView:0x7fe30d2560a0.bottom>",
    "<NSLayoutConstraint:0x7fe310d4faa0 V:[UIButton:0x7fe310dedef0'INTERESTED'(40)]>",
    "<NSLayoutConstraint:0x7fe310d5c5a0 V:[UITextView:0x7fe30e4f0200'We are Makahiya - a healt...'(>=403)]>",
    "<NSLayoutConstraint:0x7fe3110000d0 V:[UIView:0x7fe310dcb0d0(50)]>",
    "<NSLayoutConstraint:0x7fe310dd1370 V:[_UILayoutGuide:0x7fe310de5fd0]-(20)-[UILabel:0x7fe310dfaa50'Videographer']>",
    "<NSLayoutConstraint:0x7fe310dd13c0 UILabel:0x7fe310dfaa50'Videographer'.top == UILabel:0x7fe310decc60'Posted by:'.top - 24>",
    "<NSLayoutConstraint:0x7fe310dd1500 UILabel:0x7fe310decc60'Posted by:'.centerY == UILabel:0x7fe310df4d40'Robyn McGirl'.centerY>",
    "<NSLayoutConstraint:0x7fe310dd1550 UILabel:0x7fe310decc60'Posted by:'.height == UILabel:0x7fe310df4d40'Robyn McGirl'.height>",
    "<NSLayoutConstraint:0x7fe310dd1690 V:[UILabel:0x7fe310df4d40'Robyn McGirl']-(10)-[UITextView:0x7fe30e4f0200'We are Makahiya - a healt...']>",
    "<NSLayoutConstraint:0x7fe310dbd5f0 V:[UITextView:0x7fe30e4f0200'We are Makahiya - a healt...']-(10)-[Nudj.TokenView:0x7fe311012ce0]>",
    "<NSLayoutConstraint:0x7fe310dbd6e0 V:[Nudj.TokenView:0x7fe311012ce0]-(10)-[UILabel:0x7fe310dce2a0'Employer:']>",
    "<NSLayoutConstraint:0x7fe310dbd780 UILabel:0x7fe310dce2a0'Employer:'.centerY == UIImageView:0x7fe3110044e0.centerY + 2>",
    "<NSLayoutConstraint:0x7fe310dbd7d0 V:[UIImageView:0x7fe3110044e0]-(12)-[UIImageView:0x7fe310ddf630]>",
    "<NSLayoutConstraint:0x7fe310def380 V:[UIImageView:0x7fe310ddf630]-(11)-[UIImageView:0x7fe310dbb5b0]>",
    "<NSLayoutConstraint:0x7fe310def560 V:[UIImageView:0x7fe310dbb5b0]-(14)-[UIView:0x7fe310dcb0d0]>",
    "<NSLayoutConstraint:0x7fe310def600 V:[UIView:0x7fe310dcb0d0]-(>=10)-[UILabel:0x7fe310dbcc80'Referral Bonus: ']>",
    "<NSLayoutConstraint:0x7fe310def790 V:[UILabel:0x7fe310dbcc80'Referral Bonus: ']-(10)-[UIButton:0x7fe310dedef0'INTERESTED']>",
    "<NSLayoutConstraint:0x7fe310def970 V:[UIButton:0x7fe310dedef0'INTERESTED']-(20)-[_UILayoutGuide:0x7fe310ddc2e0]>",
    "<NSLayoutConstraint:0x7fe310f0fe90 'UIView-Encapsulated-Layout-Height' V:[UIView:0x7fe30d2560a0(568)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7fe310d5c5a0 V:[UITextView:0x7fe30e4f0200'We are Makahiya - a healt...'(>=403)]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.