-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add a polyfill for Objective-C to select TZStackView only when UIStackView is Unavailable #61
base: master
Are you sure you want to change the base?
Conversation
…kView is unavailable.
ab8fb9b
to
6066bba
Compare
👍 |
Have you looked at my PR #47? It uses an (arguably) better method that allows things like It also aligns the enums with their UIKit counterparts as well. |
It seems @CosynPa, @fbartho, @andi357 & myself all have a vested interested in 100% iOS 8 compatibility and, some of us, want automatic support for interface builder; not to mention some level of iOS 7 compatibility. Should figure out how to work together because we all seem to be reinventing some portion of the same wheel. |
I saw your PR @kdubb, and also PSTCollectionView's solutions to the Polyfill problem, but pulling in Assembly code was simply a non-starter with our existing shipping app and Engineering culture. (as an aside: does your assembly work with bitcode?). With the Preprocessor & iOS 7: When we started considering TZStackView, iOS 7 support was a requirement from on-high, but we successfully convinced them to drop it for new versions as the userbase numbers didn't justify it. This was overcome before the experimental branch with TZStackView was ready to undergo testing, so, now I'm neutral / don't require iOS 7 support. Storyboards: Finally, we don't use Storyboards, the lack of Storyboard integration was an indifferent/neutral point for my team, but of course I support no-compromise solutions to that integration. |
After researching it a bit more I think there is a simpler solution using the mach-o library, thereby removing the assembly requirement. This would make it compatible with bitcode as well (not sure if assembly kills bitcode but it sure seems like it could). |
It it never guaranteed that a TZStackView has exactly the same behavior as a UIStackView. I think using UIStackView in iOS 9 and replacing it with TZStackView prior to iOS 8 is dangerous. And your approach would become very confusing if both Objective-C and Swift were used. |
This messes with xcode's preprocessor and the Objective-C runtime so that you as a developer can just write UIStackView, and not worry about the fact that TZStackView is used under the hood when you're on older-iOS Versions.
Then when you're ready to drop iOS 8.x, you can just delete TZStackView and none of the rest of your code will need to change.