ios - How to set AutoLayout constraint of UIimageView with UIButton? -


this tree include cicle uiimageview's image, text in circle uibutton. when device changed, iphone5 change iphone6 plus, image scale big. button move circle's outside. how solve problem?

image here

autolayout has feature called propotion. means selecting 2 ui objects can set propotion between them constraint such width, height, etc.. in tour case select imageview , button move constraints view, double click on objects width constraint i.e either button width or image width. there can find option called propotion. per requirement want have button inside image view, means buttom propotion should less imageview propotion. can set 2:3, means button width 2/3rd part of imageview. button part of imageview irrespective of device run.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -