Explorar el Código

use system background color for the keyboard textfield

fix kambala-decapitator/vcmi#45
Andrey Filipenkov hace 3 años
padre
commit
d2ded404bb
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      client/ios/startSDL.mm

+ 5 - 1
client/ios/startSDL.mm

@@ -44,9 +44,13 @@
 	auto r = textField.frame;
 	r.size.height = 40;
 	textField.frame = r;
-    textField.backgroundColor = UIColor.whiteColor;
     self.gameChatHandler.textFieldSDL = textField;
 
+	if(@available(iOS 13.0, *))
+		textField.backgroundColor = UIColor.systemBackgroundColor;
+	else
+		textField.backgroundColor = UIColor.whiteColor;
+
     auto longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
     longPress.minimumPressDuration = 0.2;
     [view addGestureRecognizer:longPress];