ios - UICollectionView Cell + UiLabel with AutoLayout -


i'm trying pin uilabel it's parent cell. added 4 constraints (top, leading, trailing, bottom) which works fine on ios 8.0 not on ios 7.x. please see image below:

[click here full size]

enter image description here

what doing wrong? please advise!

edit #1

it seems it's broken since xcode 6 gm. approach working fine in xcode 6 beta 7.

moreover, if decrease inner view's width, throws following warning:

2014-09-10 19:58:28.109 test[57827:60b] unable simultaneously satisfy constraints.     @ least 1 of constraints in following list 1 don't want. try this: (1) @ each constraint , try figure out don't expect; (2) find code added unwanted constraint or constraints , fix it. (note: if you're seeing nsautoresizingmasklayoutconstraints don't understand, refer documentation uiview property translatesautoresizingmaskintoconstraints)  (     "<nslayoutconstraint:0x799573a0 h:|-(8)-[uiview:0x798a86e0]   (names: '|':uiview:0x798ae5d0 )>",     "<nslayoutconstraint:0x799573d0 h:[uiview:0x798a86e0]-(43)-|   (names: '|':uiview:0x798ae5d0 )>",     "<nsautoresizingmasklayoutconstraint:0x798a8b00 h=--& v=--& h:[uiview:0x798ae5d0(50)]>" )  attempt recover breaking constraint  <nslayoutconstraint:0x799573d0 h:[uiview:0x798a86e0]-(43)-|   (names: '|':uiview:0x798ae5d0 )>  break on objc_exception_throw catch in debugger. methods in uiconstraintbasedlayoutdebugging category on uiview listed in <uikit/uiview.h> may helpful. 

overriding custom cell's layoutsubviews possible workaround:

override func layoutsubviews() {     contentview.frame = bounds     super.layoutsubviews() } 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -