Skip to main content
Solved

Let absolute position constraints respond to auto layout


Peltzi
  • New Participant
  • 6 replies

Say I wish to create a speech bubble that automatically grows in height based on the text content. I can compose a bubble as a union of a triangle and a rectangle, set it to position absolutely and constrain the components to, say, keep the bubble point at the lower right corner of the bubble.
This works fine if I resize the frame manually, but the constraints don’t hold when the frame resize is caused by auto layout.
Why not?

Best answer by tank666

Just wrap the union object in a frame, and set the frame to the desired constraints (left and right, top and bottom).

View original
This topic has been closed for comments

6 replies

tank666
  • 4862 replies
  • April 6, 2023

Actually this should work. Could you record a video or share a link to an example file?


Peltzi
  • Author
  • New Participant
  • 6 replies
  • April 6, 2023

Peltzi
  • Author
  • New Participant
  • 6 replies
  • April 6, 2023

Okay I think it’s the Union that breaks the functionality. If the two components are individual children of the frame, they respond correctly. If combined into a Union, they no longer do.


tank666
  • 4862 replies
  • Answer
  • April 6, 2023

Just wrap the union object in a frame, and set the frame to the desired constraints (left and right, top and bottom).


Peltzi
  • Author
  • New Participant
  • 6 replies
  • April 6, 2023

That seems to serve as a reasonable workaround. Thank you!


  • 0 replies
  • July 5, 2023

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings