Swift 2.0 項目中利用中自定義行高 時遇到的問題?


swift2.0 項目中遇到的問題, 在計算cell行高的時候運用了自動計算行高的方法, 若是換成直接指定行高就不會有這樣的打印。swift

Unable to simultaneously satisfy constraints.this

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) spa

(debug

    "<NSLayoutConstraint:0x7fe51d969800 V:|-(0)-[WeiQianWeiBo.statuseTopView:0x7fe51d962700]   (Names: '|':UITableViewCellContentView:0x7fe51d90a1c0 )>",code

    "<NSLayoutConstraint:0x7fe51d969a70 V:[WeiQianWeiBo.statuseTopView:0x7fe51d962700(53)]>",orm

    "<NSLayoutConstraint:0x7fe51d96c120 V:[WeiQianWeiBo.statuseTopView:0x7fe51d962700]-(8)-[UILabel:0x7fe51b5d6f60'All together ... Me and a...']>",get

    "<NSLayoutConstraint:0x7fe51d96d660 V:[UILabel:0x7fe51b5d6f60'All together ... Me and a...']-(8)-[WeiQianWeiBo.StatusPictureView:0x7fe51b88fc00]>",it

    "<NSLayoutConstraint:0x7fe51d96d730 V:[WeiQianWeiBo.StatusPictureView:0x7fe51b88fc00(120)]>",io

    "<NSLayoutConstraint:0x7fe51d96dc80 V:[WeiQianWeiBo.StatusPictureView:0x7fe51b88fc00]-(8)-[WeiQianWeiBo.StatusBotttomView:0x7fe51b5e8eb0]>",ast

    "<NSLayoutConstraint:0x7fe51d96dd20 V:[WeiQianWeiBo.StatusBotttomView:0x7fe51b5e8eb0(44)]>",

    "<NSLayoutConstraint:0x7fe51d96cc40 WeiQianWeiBo.StatusBotttomView:0x7fe51b5e8eb0.bottom == UITableViewCellContentView:0x7fe51d90a1c0.bottom>",

    "<NSLayoutConstraint:0x7fe51d96ee20 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7fe51d90a1c0(175)]>"

)


Will attempt to recover by breaking constraint 

<NSLayoutConstraint:0x7fe51d96dc80 V:[WeiQianWeiBo.StatusPictureView:0x7fe51b88fc00]-(8)-[WeiQianWeiBo.StatusBotttomView:0x7fe51b5e8eb0]>


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.


這個問題不報錯, 只是在程序運行那個的時候在控制檯打印的,尚未找到好的解決方法。若是有人知道,求指教! 

相關文章
相關標籤/搜索