objective c - When to use Multiplier in iOS AutoLayout? -


an autolayout constraint can definded as:

self.view.addconstraint(nslayoutconstraint(item: label,         attribute: .bottom,         relatedby: .equal,         toitem: self.view,         attribute: .bottom,         multiplier: 1,         constant: 0)) 

i did not understand use case using multiplier.

when use multiplier in ios autolayout?

one use case commonly use when want 1 view 30% of width of view. this:

self.view.addconstraint(nslayoutconstraint(item: label,     attribute: .width,     relatedby: .equal,     toitem: self.view,     attribute: .width,     multiplier: 0.3,     constant: 0)) 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -