ios - VFl recover by breaking constraint , layout buttons' label -


i trying use vfl move label, subview of button, down below:

-------------- button1 button.label -------------- 

the code like:

[dic_bind_views setobject:btn.titlelabel forkey:[nsstring stringwithformat:@"%@",@"title"]]; [btn.titlelabel settranslatesautoresizingmaskintoconstraints:no]; nsstring *format_container_title = [nsstring stringwithformat:@"v:|-[title]-(%d)-|", item_title_offset]; [btn addconstraints:[nslayoutconstraint constraintswithvisualformat:format_container_title  options: 0                                                                     metrics:nil views:dic_bind_views]]; 

the layout shows wish for, no warning, got such result in console:

(note: if you're seeing nsautoresizingmasklayoutconstraints don't understand, refer documentation uiview property translatesautoresizingmaskintoconstraints)  (     "<nslayoutconstraint:0x7ff79b63c8e0 uibuttonlabel:0x7ff79b632860'\u97f3\u6548'.top == uibutton:0x7ff79b4bc220'\u97f3\u6548'.topmargin>",     "<nslayoutconstraint:0x7ff79b63c930 v:[uibuttonlabel:0x7ff79b632860'\u97f3\u6548']-(-40)-|   (names: '|':uibutton:0x7ff79b4bc220'\u97f3\u6548' )>",     "<nslayoutconstraint:0x7ff79b535470 uibuttonlabel:0x7ff79b632860'\u97f3\u6548'.height <= uibutton:0x7ff79b4bc220'\u97f3\u6548'.height>" )  attempt recover breaking constraint    nslayoutconstraint:0x7ff79b63c8e0 uibuttonlabel:0x7ff79b632860'music'.top == uibutton:0x7ff79b4bc220'music'.topmargin 

anyone have clue this? hope not make side-effect crash app when api updated in future.. appreciate.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -