Comments (12)
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.
from oastackview.
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
from oastackview.
It seems like TZStackView has more features implemented, but OAStackView is faster and has more recognition.
Maybe @tomvanzummeren should contribute back to OAStackView?
from 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 :)
from oastackview.
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.
from oastackview.
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.
from oastackview.
@tomvanzummeren This is what happens when you hide a view inside an animation block
The change was to explicitly call layoutIfNeeded
in the animation block.
I know that hidden is not animated, but OAStackView has KVO observation on the subviews, that will remove the view and rearrange the constraints accordingly.
from oastackview.
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
[email protected] wrote:
@tomvanzummeren This is what happens when you hide a view inside an animation block
The change was to explicitly call
layoutIfNeeded
in the animation block.Reply to this email directly or view it on GitHub:
#10 (comment)
from oastackview.
This is what I mean:
I also implemented it with KVO.
from oastackview.
@tomvanzummeren oh, now I see, thanks, I will create an issue for that
from oastackview.
Oh wow, so I am contributing after all. Happy to help!
from oastackview.
@tomvanzummeren thanks for the help :) I will close this issue and open the another one.
from oastackview.
Related Issues (20)
- ios7 compatibility HOT 2
- Doesn't work as documented in IB
- Sequence error in layout subviews by using OAStackView HOT 2
- Bump a version from master to 0.3.0 HOT 2
- Update README to reflect usage of UIStackView in xib for iOS < 9 HOT 1
- Framework not found! HOT 1
- `arrangedSubviews` is not behaving as expected. HOT 1
- Interacting with a stackView created in Storyboard in code crashes HOT 1
- Layout Margins set in Interface Builder not respected HOT 1
- Documentaton for Alignment and Distribution Values HOT 1
- Crash when adding a new arranged subview HOT 2
- Constraints added to Stack View are not working properly. HOT 1
- Include of non-modular header inside framework module HOT 3
- Importing file error/Can't build Objective-C module HOT 2
- Example App: Installing CocoaPods results in "Unsupported options `{:exclusive=>true}`" error HOT 3
- App crash when initialize the OAStackView HOT 1
- Behavior mismatch between `removeArrangedSubview:` and `removeFromSuperview`
- [XIB] Does not work on xib file?
- Hi there.
- Getting error in Xcode 8.1 version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oastackview.