0

I have a View, setting Multiplier to make it perfect on all the devices.

My Values are

Constant = 0
Priority = 1000
Multiplier = 1.5

It will set this as proportionally according to all devices.

Now, MULTIPLIER is READ-ONLY property, so For moving this View up or down or in any direction, I can't change this.

Now I have option to change Constant, but I am unable to find ratio formula, that How should I change constant according to multiplier,

Image of View Constraint.

enter image description here

Thanks

Sam Shaikh
  • 1,596
  • 6
  • 29
  • 53
  • I'm asked it [before](http://stackoverflow.com/questions/19593641/can-i-change-multiplier-property-for-nslayoutconstraint) – Bimawa Sep 07 '15 at 19:28
  • No you didn't, I think you must read my question again, I know multiplier is read only, but I want to calculate constant from read only multiplier. – Sam Shaikh Sep 08 '15 at 05:01
  • For move view u must recreate frames for views, autolayout do not change "setFrame method" its expand for setup adaptive views once on superview and dinamicaly change frames for each subviews depend of this superview(or other view) frame. If u need specificaly animation u must use urself calcualtion frame for all your views. and overload 'layoutSubiviews' method. You can recreate constraints if u have 2 endpoint of animation. And call 'layoudSubviews' in animation block of UIView. – Bimawa Sep 08 '15 at 08:53

0 Answers0