FlexLayout icon indicating copy to clipboard operation
FlexLayout copied to clipboard

Auto Resize!

Open VasilisLule opened this issue 5 years ago • 2 comments

Στιγμιότυπο 2019-10-30, 9 03 51 μμ Στιγμιότυπο 2019-10-30, 9 03 03 μμ

I have a selector and when i switch accountypes i want to hide 2certain textFields and the others come to Top. Any ideas?

VasilisLule avatar Oct 30 '19 19:10 VasilisLule

You need to relayout the Flex container, i.e. do what you probably do in your UIView.layoutSubviews() or UIViewController.viewDidLayoutSubviews().

lucdion avatar Oct 30 '19 19:10 lucdion

Hi @lucdion, similar problem here, I had a button component that self size when label text changed. And I need the container relayout when subview's size changed. (dynamic container size)

Currently I call self.superview.flex.layout() in my component but I don't think it's a good idea.

Some question:

Q1: What's is best practice to notify the flexContainer which is the component's super view? Q2: If no better solution, how to implement the requirement with PinLayout?

Could you please give me some tips or suggestion to resolve it. 🙏 If need much more info or need to create a separate issue, feel free to let me know, thanks. 😃

marcuswu0814 avatar Dec 12 '19 12:12 marcuswu0814

After facing the auto resize issue on flexLayout. I Tried using YogaKit directly maybe the behaviour will be different however am still seeing the same issue.

abumubaarak avatar Nov 20 '22 13:11 abumubaarak

i had to reload the view controller when ever i need to update the container

abumubaarak avatar Nov 23 '22 22:11 abumubaarak

Very old topic. Closing it.

lucdion avatar Mar 01 '23 20:03 lucdion