cordova-wheel-selector-plugin
cordova-wheel-selector-plugin copied to clipboard
iOS 13: Issue with wheel selector on iPad with dark theme enabled
I am using Wheel selector plugin and facing issue after upgrading the iPad iOS 13 with dark theme enabled on iPad. The wheel selector is showing blank.
Any fix available for this issue?
I don't have access to a Mac or iPad, so possibly someone else in the community can look at it?
On Fri, Sep 13, 2019, 2:55 AM PC-Nitin [email protected] wrote:
Any fix available for this issue?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jasonmamy/cordova-wheel-selector-plugin/issues/53?email_source=notifications&email_token=ACPVJRW3Y7OIOFZHRE2RVXLQJNPQNA5CNFSM4IT4KE62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6UR34Q#issuecomment-531176946, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPVJRTGTPYEQDX54UHVP33QJNPQNANCNFSM4IT4KE6Q .
Ok thanks. PFA the screenshot. This issues exists in multiple applications where wheel selector is plugin is used.
Can you look in the logs for anything suspicious?
On Mon, Sep 16, 2019, 4:23 AM PC-Nitin [email protected] wrote:
Ok thanks. PFA the screenshot. This issues exists in multiple applications where wheel selector is plugin is used. [image: MT US dark mode time selection is blank] https://user-images.githubusercontent.com/54939176/64954175-673f1600-d8a2-11e9-93ca-8b8e03edd371.png
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jasonmamy/cordova-wheel-selector-plugin/issues/53?email_source=notifications&email_token=ACPVJRRWQ62PEQBIQI7YJUTQJ5UB7A5CNFSM4IT4KE62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Y2ROI#issuecomment-531736761, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPVJRSP2H5P5ZZR55IFAEDQJ5UB7ANCNFSM4IT4KE6Q .
Using the system background colour works for me in iOS 13
diff --git a/src/ios/SelectorCordovaPlugin.m b/src/ios/SelectorCordovaPlugin.m
index 5f0dc78..eaf5239 100644
--- a/src/ios/SelectorCordovaPlugin.m
+++ b/src/ios/SelectorCordovaPlugin.m
@@ -78,7 +78,10 @@ typedef NS_ENUM(NSInteger, SelectorResultType) {
- (UIView *)createPickerView {
// Initialize container view
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, [self getSafeBottomPadding], self.viewSize.width, 260 + [self getSafeBottomPadding])];
- if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
+ if (@available(iOS 13, *)) {
+ [view setBackgroundColor:[UIColor systemBackgroundColor]];
+ }
+ else if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
[view setBackgroundColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.0]];
}
- (UIView *)createPickerView {
// Initialize container view
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, [self getSafeBottomPadding], self.viewSize.width, 260 + [self getSafeBottomPadding])];
if (@available(iOS 13, *)) {
[view setBackgroundColor:[UIColor systemBackgroundColor]];
}
else if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
[view setBackgroundColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.0]];
}
JamesBewleys change fixed the problem for me. I would love an update with this fix :)
If someone can merge, I can release it?
On Wed, Oct 16, 2019, 7:56 AM Grímur Kristinsson [email protected] wrote:
JamesBewleys change fixed the problem for me. I would love an update with this fix :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jasonmamy/cordova-wheel-selector-plugin/issues/53?email_source=notifications&email_token=ACPVJRS5ZQMXWJ366DWTBPLQO4TRTA5CNFSM4IT4KE62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBMZP3Y#issuecomment-542742511, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPVJRTFQKGP7ISENGAZAEDQO4TRTANCNFSM4IT4KE6Q .
Using the system background colour works for me in iOS 13
diff --git a/src/ios/SelectorCordovaPlugin.m b/src/ios/SelectorCordovaPlugin.m index 5f0dc78..eaf5239 100644 --- a/src/ios/SelectorCordovaPlugin.m +++ b/src/ios/SelectorCordovaPlugin.m @@ -78,7 +78,10 @@ typedef NS_ENUM(NSInteger, SelectorResultType) { - (UIView *)createPickerView { // Initialize container view UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, [self getSafeBottomPadding], self.viewSize.width, 260 + [self getSafeBottomPadding])]; - if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { + if (@available(iOS 13, *)) { + [view setBackgroundColor:[UIColor systemBackgroundColor]]; + } + else if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { [view setBackgroundColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.0]]; }
- (UIView *)createPickerView { // Initialize container view UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, [self getSafeBottomPadding], self.viewSize.width, 260 + [self getSafeBottomPadding])]; if (@available(iOS 13, *)) { [view setBackgroundColor:[UIColor systemBackgroundColor]]; } else if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { [view setBackgroundColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.0]]; }
I made a pull request yesterday implementing the code: https://github.com/jasonmamy/cordova-wheel-selector-plugin/pull/54
newage99, thanks, your change has been merged, and a new version was just published to npm (1.1.4).
On Tue, Oct 22, 2019 at 3:11 AM newage99 [email protected] wrote:
Using the system background colour works for me in iOS 13
diff --git a/src/ios/SelectorCordovaPlugin.m b/src/ios/SelectorCordovaPlugin.m index 5f0dc78..eaf5239 100644 --- a/src/ios/SelectorCordovaPlugin.m +++ b/src/ios/SelectorCordovaPlugin.m @@ -78,7 +78,10 @@ typedef NS_ENUM(NSInteger, SelectorResultType) {
- (UIView *)createPickerView { // Initialize container view UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, [self getSafeBottomPadding], self.viewSize.width, 260 + [self getSafeBottomPadding])];
- if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) {
- if (@available(iOS 13, *)) {
- [view setBackgroundColor:[UIColor systemBackgroundColor]];
- }
- else if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { [view setBackgroundColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.0]]; }
- (UIView *)createPickerView { // Initialize container view UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, [self getSafeBottomPadding], self.viewSize.width, 260 + [self getSafeBottomPadding])]; if (@available(iOS 13, *)) { [view setBackgroundColor:[UIColor systemBackgroundColor]]; } else if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { [view setBackgroundColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha:1.0]]; }
I made a pull request yesterday implementing the code: #54 https://github.com/jasonmamy/cordova-wheel-selector-plugin/pull/54
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jasonmamy/cordova-wheel-selector-plugin/issues/53?email_source=notifications&email_token=ACPVJRRF4L5VGHWNRDLBPKTQP3GV5A5CNFSM4IT4KE62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB5GSUA#issuecomment-544893264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPVJRX4FHHCXCUSJMXOTCTQP3GV5ANCNFSM4IT4KE6Q .
For future reference on plugins that do not get updated as quickly and efficiently as this one (thank you all!)
You can set UIUserInterfaceStyle to Light
in your Info.plist file to force the UI to light.
Copy + Paste this into your Info.plist
<key>UIUserInterfaceStyle</key>
<string>Light</string>
Should I add your tip to the readme docs?
On Tue, Oct 22, 2019, 1:18 PM sta55en [email protected] wrote:
For future reference on plugins that do not get updated as quickly and efficiently as this one (thank you all!)
You can set UIUserInterfaceStyle to Light in your Info.plist file to force the UI to light.
Copy + Paste this into your Info.plist
UIUserInterfaceStyle Light — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jasonmamy/cordova-wheel-selector-plugin/issues/53?email_source=notifications&email_token=ACPVJRTZLQPSSELGLD2VUTDQP5N2NA5CNFSM4IT4KE62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB7BY7Y#issuecomment-545135743, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPVJRXQKV25B354L5RNLGTQP5N2NANCNFSM4IT4KE6Q .
Should I add your tip to the readme docs?
@jasonmamy You are most welcome to. I've seen quite a few Cordova devs struggle with issues related to this so it might save a few people some time.