-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tomvanzummeren/TZStackView #10
Comments
Hey, I think the main difference is that its written in swift, which means you will have to include libswiftcore.dylib and other swift libs when compiling your app. Another main difference is in the way both project deals with changing settings, while in OAStackView performance was key (since you are going to use the stackview in complicated layouts). Changing axes and other settings will not cause the stack view to remove all the constraints. In TZStackView changes will invalidate the constraints and add them again, this might affect performance badly for bigger, more complicated UIs. Other differences are in the testing approaches both project uses, I have to say that testing constraint is the best approach, I will be moving the project test suite to constraints in the upcoming days. |
Thanks for the feedback And sorry, I wasn't aware of this component when I created mine. I was participating WWDC when I heard about this new UIStackView and I was so enthusiastic about it that I decided to create it myself for earlier iOS versions. But OAStackView has beaten me to the punch! I really did search for something similar when I started, but couldn't find anything! Btw, another difference: I implemented all distribution options of the UIStackView, OAStackView did just do Fill and FillEqually. Also, just like with UIStackView, you can put subview.hidden = true inside an animation block and it will animate hiding/showing the subview. I implemented that as well with TZStackView |
It seems like TZStackView has more features implemented, but OAStackView is faster and has more recognition. Maybe @tomvanzummeren should contribute back to OAStackView? |
@tomvanzummeren and @harlanhaskins The other distribution options have been introduced today by PR #8. the readme will be updated to reflect this addition soon. I am not sure I understand the hiding argument, but OAStackView does indeed handle hiding the views, I didn't try, but setting a subview hidden inside a beginAnimation block should animate it as I only manipulate the layout constraints. @tomvanzummeren and @harlanhaskins I am open to discus any contribution option guys :) |
Try it. Animating the hidden property of a subview doesn't just work out of the box. That's why it's mentioned in a separate part of the UIStackView docs. But anyway, we both took different approaches. No use to contribute. OAStackView did it with performance in mind and is written in ObjC. Mine is in Swift and I decided performance is not important as you're not adding and removing subviews multiple times per second. I also can't imagine that UIStackView is doing it any differently. With TZStackView I focussed on having the exact same API and behaviour to be able to drop-in replace it with the real UIStackView and see no difference. |
And also: I created TZStackView just because I wanted it for myself. This time I decided to share it with everyone by putting it on GitHub. I can take it down if it is not appreciated, but I won't contribute. It already took way too much of my spare time to create this one. |
@tomvanzummeren This is what happens when you hide a view inside an animation block The change was to explicitly call |
Well that's no good, is it? The red block disappears immediately. With the real UIStackView, it collapses before it disappears. On Sun, Jun 21, 2015 at 6:56 PM, Omar Abdelhafith
|
@tomvanzummeren oh, now I see, thanks, I will create an issue for that |
Oh wow, so I am contributing after all. Happy to help! |
@tomvanzummeren thanks for the help :) I will close this issue and open the another one. |
I was wondering what the difference was between this control:
https://github.com/tomvanzummeren/TZStackView
The text was updated successfully, but these errors were encountered: