nsomar / OAStackView

Porting UIStackView to iOS 7+
MIT License
2.14k stars 191 forks source link

Maintain arranged subviews array #56

Closed assafgelber closed 8 years ago

assafgelber commented 9 years ago

Hi!

Firstly, thanks for working on this, I just started using and it made my life a lot simpler! :smiley_cat: I was missing the arrangedSubview functionality, as also mentioned in #43, so tried to add it, including accompanying specs.

The solution is just for arrangedSubviews to be mutable, initialized as either empty or with the passed in initial views and update it accordingly when inserting or removing subviews. There is another possible enhancement, so that every place where now self.subviews is used, to use self.arrangedSubviews and completely ignore any subviews which aren't array, but I'm not sure if that's a valid option in your opinions, so I haven't implemented that here yet.

Would love to hear feedback! Cheers! :beers:

assafgelber commented 8 years ago

@bencallis Done!

ZevEisenberg commented 8 years ago

+1 would love to see this merged.

nsomar commented 8 years ago

This looks fantastic, sorry for the late action, I will be merging it this weekend, thanks for the addition :)

assafgelber commented 8 years ago

Awesome, thanks! :cocktail:

nsomar commented 8 years ago

@agelber Great addition! I have rebased it and will merge it in a moment. The only real change that I made was removing the old arrangedView in the class extension since its not used anymore.

Thanks for this PR!

assafgelber commented 8 years ago

Cheers!

dmakarenko commented 8 years ago

Hi guys. Thanks for fixing the problem with the arrangedSubview property. Could you please bump the Podspec version so the fix can be accessible via the CocoaPods. Cheers!