uitableview - UITableViewAutomaticDimension not working properly in iOS 9 -
in app have custom tableviewcells fixed ratio (16x9). achieve that, placed view in cell, fixed parent view (although did in interface builder: v/h:|-[innerview]-|
). also, put ratio constraint on it.
in tableviewcontroller i'm using uitableviewautomaticdimension
table cell height.
the estimated row height 180, wich exact size cell have on 320px wide display (as i, can see, do).
i'm still deploying 8.4, when running project on device ios 9, i'm getting tons of auto layout warnings, although works fine , looks perfect.
the warning absolutely right. there 2 constraints don't want – these ios added on own.
2015-09-29 11:24:57.771 app[1039:324736] 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:0x147d3e0d0 uiview:0x14901ff70.height == 0.5625*uiview:0x14901ff70.width>", "<nslayoutconstraint:0x147dd0210 h:|-(0)-[uiview:0x14901ff70] (names: '|':uitableviewcellcontentview:0x14901f960 )>", "<nslayoutconstraint:0x147deeca0 v:|-(0)-[uiview:0x14901ff70] (names: '|':uitableviewcellcontentview:0x14901f960 )>", "<nslayoutconstraint:0x149053c30 v:[uiview:0x14901ff70]-(0)-| (names: '|':uitableviewcellcontentview:0x14901f960 )>", "<nslayoutconstraint:0x147dbc2b0 h:[uiview:0x14901ff70]-(0)-| (names: '|':uitableviewcellcontentview:0x14901f960 )>", "<nslayoutconstraint:0x149070800 'uiview-encapsulated-layout-height' v:[uitableviewcellcontentview:0x14901f960(179.5)]>", "<nslayoutconstraint:0x1490707b0 'uiview-encapsulated-layout-width' h:[uitableviewcellcontentview:0x14901f960(320)]>" ) attempt recover breaking constraint <nslayoutconstraint:0x147d3e0d0 uiview:0x14901ff70.height == 0.5625*uiview:0x14901ff70.width> make symbolic breakpoint @ uiviewalertforunsatisfiableconstraints catch in debugger. methods in uiconstraintbasedlayoutdebugging category on uiview listed in <uikit/uiview.h> may helpful.
the thing see here missing 0.5 pixels ios subtracted somehow magically.
the issue 2 constraints tableview adds automatically. uiview-encapsulated-layout-height , width height , width table view calculated cell during initial load, based on cell's constraints @ time.
"<nslayoutconstraint:0x149070800 'uiview-encapsulated-layout-height' v:[uitableviewcellcontentview:0x14901f960(179.5)]>", "<nslayoutconstraint:0x1490707b0 'uiview-encapsulated-layout-width' h:[uitableviewcellcontentview:0x14901f960(320)]>"
as priorities these constraints 1000 can lower height , width constraint priorities , let encapsulated size applied when needed (at load).
Comments
Post a Comment