Add support for dark mode on iOS 13

Fix layout issues on iOS 13
Closes #2
This commit is contained in:
shiftcmdk
2020-05-27 21:20:08 +02:00
parent c059a9e5dd
commit 36bd429fca
2 changed files with 39 additions and 9 deletions

View File

@@ -52,8 +52,13 @@
UIView *topSeparatorView = [self valueForKey:@"_topSeparatorView"];
topSeparatorView.hidden = YES;
self.contentView.backgroundColor = [UIColor whiteColor];
self.backgroundColor = [UIColor whiteColor];
if (@available(iOS 13, *)) {
self.contentView.backgroundColor = [UIColor systemBackgroundColor];
self.backgroundColor = [UIColor systemBackgroundColor];
} else {
self.contentView.backgroundColor = [UIColor whiteColor];
self.backgroundColor = [UIColor whiteColor];
}
}
-(void)dealloc {