1

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

Kiran
  • 343
  • 3
  • 13

1 Answers1

0

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
Kiran
  • 343
  • 3
  • 13