-
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
UIStackView for iOS9 #2
Comments
Maybe it makes sense to use approach from here to fallback to original iOS 9 implementation: https://github.com/steipete/PSTCollectionView/blob/master/PSTCollectionView/PSTCollectionView.h |
I am still not sure about how to approach fallback here, as most of the time you would use the stackview from the interface builder. |
There are ways to parse things from the interface builder by reading the undocumented keys from |
@steipete Thanks for the info, that is very helpful!, Indeed I still have a couple of loose ends to tie in order to be feature complete. I will definitely checkout PSTCollectionView as a reference on how to do seamless integration with backward compatibility. Thanks :) |
@oarrabi I definitely support this issue. Very much desire the PSTCollectionView strategy so we use Apple's implementation on iOS 9. 👍 |
I did the initial part of what @steipete suggested - I created a solution that handles that, but only on code - I called it StackViewProxy. (Any suggestions for a better name?) |
It might be more reliable to use an |
You are right. But I want it to work like this
Using the UIView approach, it would work. Can the same be said with the NSProxy approach? |
How about just using |
Another vote here for |
Indeed that's great! Thanks for the suggestion, I wasn't aware about it, @mthole and @harlanhaskins |
I made a better way to maintain this, using runtime injection for <iOS9, this allow you to maintain OAStackView as normal UIStackView on storyboard, reference #60 |
Runtime injection doesn't work for me for some reason. |
For UIStackView alloc] init you would need asm instruction to swich UIStackView symbols like here: https://github.com/forkingdog/FDStackView/blob/master/FDStackView/FDStackView.m#L240 which authors didn't want to include. UIStackView works from storyboard fine. |
I see. Thanks! |
@mindz-eye If you're not interested in ASM instructions: you could probably pull in the relevant file from this PR for your UIStackView tomvanzummeren/TZStackView#61. It uses a preprocessor trick rather than assembly to make Objective-C work seamlessly. -- Doesn't work for Interface Builder. |
This is nice for backward capability but will this use UIStackView if it's on iOS9?
The text was updated successfully, but these errors were encountered: