FlexLayout
FlexLayout copied to clipboard
Auto Resize!
I have a selector and when i switch accountypes i want to hide 2certain textFields and the others come to Top. Any ideas?
You need to relayout the Flex container, i.e. do what you probably do in your UIView.layoutSubviews()
or UIViewController.viewDidLayoutSubviews()
.
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. 😃
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.
i had to reload the view controller when ever i need to update the container
Very old topic. Closing it.