How to adjust button width based on screen width in Quartz Designer for iPhone

98 views Asked by At

Is there any possibility to adjust button width based on screen width in origami for iPhone, with some expression;

For Example: button.width = screen.width - 50

I can't add my current design image to this question due to my low reputation

1

There are 1 answers

0
Kiran On

I tried to solve this on my own as below;

Add the following Patches from Patch Library

  • Button Patch
  • Rendering Destination Dimensions Patch
  • Math Patch

Then,

  • Link Pixels Wide on Rendering Destination Dimensions to first Parameter on Math Patch
  • Modify Second Parameter on Math Patch to required value (For Example: 50)
  • Select the - (Minus) Operator on the Math Patch
  • Link Output of Math Patch to Width on Button Patch