Support iOS 11 prefersLargeTitles #1643#2090
Conversation
| NSNumber *prefersLargeTitles = self.navigatorStyle[@"prefersLargeTitles"]; | ||
| BOOL prefersLargeTitlesBool = prefersLargeTitles ? [prefersLargeTitles boolValue] : NO; | ||
| if (prefersLargeTitlesBool) { | ||
| [self.navigationController.navigationBar setPrefersLargeTitles:YES]; |
There was a problem hiding this comment.
These setters can be written as self.navigationController.navigationBar.prefersLargeTitles = prefersLargeTitlesBool as well, to use Objective-C 2.0 syntax, as well as reuse the prefersLargeTitlesBool variable to match/simplify the logic.
| } | ||
| } | ||
|
|
||
| if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0) { |
There was a problem hiding this comment.
What do you think about using a if (@available(iOS 11.0, *)) check here instead of checking the device's system version?
There was a problem hiding this comment.
Since the @available can only be used in xcode9 and higher (backward compatible wise), it's better to use device's system version
There was a problem hiding this comment.
If the argument is for backwards compatibility, I would argue that using [self.navigationController.navigationBar respondsToSelector:@selector(setPrefersLargeTitles:)] would be a better alternative than a version check.
|
What can I do to help get this PR merged in? |
|
@eliperkins can u plz fix it to |
|
Sorry for late reply. I’ll do that tonight. 🙏
2017년 11월 14일 (화) 오전 8:13, Eli Perkins <notifications@github.com>님이 작성:
… @gran33 <https://github.com/gran33> Since I'm just a contributor and not
a collaborator, I can't make edits to this PR.
@yomybaby <https://github.com/yomybaby> can you make that change?
Otherwise, I'll need to open a different PR or we can merge this and fix
it in master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2090 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAl6n1NH35ncCcShi9nb5K9AH-RTfyi3ks5s2NspgaJpZM4QJ37j>
.
|
a2399ee to
4db2d61
Compare
|
@eliperkins I just changed some code. Thank for your suggestion. |
|
@birkir I don't think this is an issue with this library, but rather just an iOS quirk. If you find the root cause of this is in |
|
Yeah I'm more suspecting React Native in general. Maybe this recently added method can be used to fix the problem |
|
@yoavaa @eliperkins Should we get it merged? |
|
What happened? @gran33 |
|
Sorry guys, This PR breaks xcode8 users, and force xcode8 to update to xcode9. |
|
Can we open a discussion to updating this library to require Xcode 9? It seems like quite a big deal to cut features of the most recent operating system in order to support an outdated toolchain. |
|
Xcode 9 is the latest stable version, that's what we should support. |
|
@yomybaby can u plz try to build it in xcode8 and add |
|
About the scroll issue... I think you may be right about it being a iOS quirk. I saw one app that has the same bug Parcel (I don't know if it's an react native app or not). But somehow Apple makes it look smooth in their apps, I deeply want to fix the problem, so any ideas are greatly appreciated, I don't know where to look or start debugging. |
|
Any updates on this issue? |
|
@yomybaby Sorry to trouble you, could you resubmit the PR with support for xcode 8? |
|
@guyca I think if you |
* master: (22 commits) setTabButton to change the label of the TabButton (wix#2215) 3D Touch Preview API (wix#2186) Update android-specific-use-cases.md Update android-specific-use-cases.md Load props from props registry for redux screens Nav bar save props (wix#2211) Support passing unserializable props to custom navBar component Save buttons props for root screens Ensure that styles set on individual buttons are not overridden (wix#2200) Update top-level-api.md (Android) Allow disableOpenGesture right or left in the drawer (wix#2189) Revert "Support iOS 11 prefersLargeTitles #1643 (wix#2090)" (wix#2204) Support iOS 11 prefersLargeTitles #1643 (wix#2090) Support passing unserializable props to custom button (wix#2192) addOnNavigatorEvent improvements (wix#2175) Fix missing props (wix#2179) Revert "Don't custom button props over the bridge (wix#2174)" (wix#2177) Don't custom button props over the bridge (wix#2174) Set missing TopBar background color Register multiple navigatorEventListeners (wix#2173) ...
|
It seems that this PR is reverted in master, any ETA on the status? I couldn't keep track. |
|
Does anyone know where can I add this code on v2? -- |
* Support iOS 11 prefersLargeTitles #1643 * better and more simple version checking and setting
* Support iOS 11 prefersLargeTitles #1643 * better and more simple version checking and setting
|
Is this PR likely to get remerged anytime soon? |
|
It was already remerged yesterday on #2593 AFAIK. |
Please, see #1643