mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 20:42:59 +02:00
Work around more Solarium bugs
This commit is contained in:
@@ -15,7 +15,6 @@ static double StatusBarHeight(void)
|
||||
if (!ret && [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
|
||||
ret = 32; // iPadOS is buggy af
|
||||
}
|
||||
NSLog(@"height = %f", ret);
|
||||
}
|
||||
});
|
||||
return ret;
|
||||
|
@@ -2114,3 +2114,21 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/* +[UIColor labelColor] is broken in some contexts in iOS 26 and despite being such a critical method
|
||||
Apple isn't going to fix this in time. */
|
||||
@implementation UIColor(SolariumBugs)
|
||||
+ (UIColor *)labelColor
|
||||
{
|
||||
return [UIColor colorWithDynamicProvider:^UIColor *(UITraitCollection *traitCollection) {
|
||||
switch (traitCollection.userInterfaceStyle) {
|
||||
|
||||
case UIUserInterfaceStyleUnspecified:
|
||||
case UIUserInterfaceStyleLight:
|
||||
return [UIColor blackColor];
|
||||
case UIUserInterfaceStyleDark:
|
||||
return [UIColor whiteColor];
|
||||
}
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
Reference in New Issue
Block a user