prewarm soft keyboard on app launch

This commit is contained in:
TrueZhuanjia
2025-12-28 22:19:30 +08:00
parent 22e270c4df
commit 9c18ab4142
@@ -1681,6 +1681,19 @@ static NSMutableSet* hostList;
GCController* controller = note.object;
[self unregisterControllerCallbacks:controller];
}];
[self prewarmSoftKeyboard];
}
- (void)prewarmSoftKeyboard {
dispatch_async(dispatch_get_main_queue(), ^{
UITextField *tf = [[UITextField alloc] initWithFrame:CGRectZero];
tf.hidden = YES;
[[UIApplication sharedApplication].windows.firstObject addSubview:tf];
[tf becomeFirstResponder];
[tf resignFirstResponder];
[tf removeFromSuperview];
});
}
-(void)viewDidLayoutSubviews{