[WIP] Fixes issues with the arrangedSubviews property#17
[WIP] Fixes issues with the arrangedSubviews property#17Thomvis wants to merge 10 commits intonsomar:masterfrom
Conversation
- removing a view from the arranged subviews now does not remove it as a subview (like UIStackView) - this needed a strong separation between subviews and arrangedSubviews, not just having arrangedSubviews be all non-hidden subviews - implemented the arrangedSubviews @Property, which was previously unused - arrangedSubviews is now KVO’able
|
I've discovered some bugs after I filed the PR, so it definitely deserves the |
|
This looks like a change to the correct direction, working with visible views was not really the optimal solution and I wanted to move away from it. I agree with your decision with going with arranged view storage. |
…in the aligning axis This prevents arranged subviews from growing outside the stack view’s frame. This could happen if the size of the stackview was constrained so it could not become its intrinsic size.
|
I just pushed some more commits to this PR. Not all of them strictly relate to the arrangedSubviews change, but I've been trying to make improvements to
|
|
@Thomvis — Ping on this one? I just ran into some of the |
This is quite a big PR, so please bear with me and let me know if you are open for changes like this.
I found that the
arrangedSubviewsproperty was not properly implemented. For starters, it was alwaysnil. Looking for a solution, I found that the heavy reliance onself.subviewsmade it impossible to implement arranged subviews. I started shuffling things around and here we are...Main improvements:
All the tests pass and the example project runs fine, but I'd like to do some more testing in my own project. Let me know what you think!