Closed stallent closed 9 years ago
if i implement traitCollectionDidChange: in OAStackView and then call layoutArrangedViews it seems to fix the issue
@stallent can you provide small example project for this case, please?
No need. It reproduces in the example project. Simply select the StackView in the main storyboard and add a size class to it (Regular,Regular for example). You will notice the initial rendering is incorrect. Once you click buttons it fixes itself but the issue is layoutArrangedViews never gets called once you add a size class to the view in the nib.
@stallent I've added size class and it looks fine for me. Can you please if the issue still exists in 0.2.0 tag?
Just tried. Still there. Steps to reproduce... Open example. Select the stackView instance in the storyboard and add this:
Run in simulator and initial rendering becomes this: (which isn't correct)
As I mentioned initially, the timing of when the view gets sized is different when you add a sizeClass and layoutArrangedViews is getting called too early.
@stallent thanks a lot for this, now I'm finally managed to reproduce it
@stallent fixed now :+1:
Thank you! Looks great!
When i use OAStackView in a universal nib/storyboard it works great, but if i add any views anywhere (related to stackView or not) that are only installed in certain size classes, OAStackView won't render properly. Anyone else seen this and/or have a workaround?