Skip to content

Commit

Permalink
iOS: settings UI support darkmode/transition
Browse files Browse the repository at this point in the history
  • Loading branch information
palxex committed Aug 12, 2021
1 parent d9f047e commit 677fdc7
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ios/SDLPal/Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
platform :ios, '9.0'
target 'SDLPal'
pod 'ActionSheetPicker-3.0', '~> 2.2.0'
pod 'ActionSheetPicker-3.0', :git => 'https://github.com/arnoldxt/ActionSheetPicker-3.0'
19 changes: 12 additions & 7 deletions ios/SDLPal/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
PODS:
- ActionSheetPicker-3.0 (2.2.0)
- ActionSheetPicker-3.0 (2.3.0)

DEPENDENCIES:
- ActionSheetPicker-3.0 (~> 2.2.0)
- ActionSheetPicker-3.0 (from `https://github.com/arnoldxt/ActionSheetPicker-3.0`)

SPEC REPOS:
trunk:
- ActionSheetPicker-3.0
EXTERNAL SOURCES:
ActionSheetPicker-3.0:
:git: https://github.com/arnoldxt/ActionSheetPicker-3.0

CHECKOUT OPTIONS:
ActionSheetPicker-3.0:
:commit: ad21f8c8908665ee68623d4fee6c26baaa4cb0dd
:git: https://github.com/arnoldxt/ActionSheetPicker-3.0

SPEC CHECKSUMS:
ActionSheetPicker-3.0: d11a4c12c6aaf704b8a3f56d179198c99f3e41e6
ActionSheetPicker-3.0: eef157d75e151f255c5333d26656c7fbfe905a51

PODFILE CHECKSUM: be35b85445902b4ef4b0612457667fb9db5cabcd
PODFILE CHECKSUM: 127c6b1e35507ac5690f7c9e987f16b4f6c1f229

COCOAPODS: 1.10.1
29 changes: 29 additions & 0 deletions ios/SDLPal/SDLPal/SettingsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,35 @@ - (void)viewDidLoad {
[self readConfigs];
[self reloadMusic];
}

-(void)setLabelColor:(UIColor *)color {
[lblResourceStatus setTextColor:color];
[lblLanguageFile setTextColor:color];
[lblFontFile setTextColor:color];
[lblShader setTextColor:color];
[textTextureWidth setTextColor:color];
[textTextureHeight setTextColor:color];
[lblMusicType setTextColor:color];
[lblSynthesizer setTextColor:color];
[lblOPLCore setTextColor:color];
[lblSynthParam setTextColor:color];
[lblOPLChip setTextColor:color];
[lblOPLRate setTextColor:color];
[lblCDAudioSource setTextColor:color];
[lblResampleRate setTextColor:color];
[lblAudioBufferSize setTextColor:color];
[lblLogLevel setTextColor:color];
[textLogFile setTextColor:color];
}

-(void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
if (@available(iOS 13.0, *)) {
[self setLabelColor: [UIColor labelColor]];
}else{
[self setLabelColor:(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) ? [UIColor blackColor] : [UIColor whiteColor]];
}
}

-(void)dismissKeyboard
{
[self.view endEditing:YES];
Expand Down
5 changes: 0 additions & 5 deletions macos/Pal.xcodeproj/xcshareddata/xcschemes/SDLPal.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@
value = ""
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "DYLD_INSERT_LIBRARIES"
value = "/usr/lib/libgmalloc.dylib"
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "PrefersMallocStackLoggingLite"
value = ""
Expand Down

0 comments on commit 677fdc7

Please sign in to comment.