1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

use system background color for the keyboard textfield

fix kambala-decapitator/vcmi#45
This commit is contained in:
Andrey Filipenkov
2022-09-22 14:07:41 +03:00
parent 7b4412758c
commit d2ded404bb

View File

@@ -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];