The keyboard does not appear when a text field is pressed in UIWebView

I have UITabViewControllerwith two tabs, the second with a web browser. The keyboard will not appear in my application unless I first show and reject UIAlertViewon the first tab. What could be wrong?

+3
source share
5 answers

solvable; I accidentally deleted:

[window makeKeyAndVisible];
+10
source

, , . , , , iOS , , . . , , . , . . , .

-:

- (BOOL)webView:(UIWebView *)v shouldStartLoadWithRequest:(NSURLRequest *)r navigationType:(UIWebViewNavigationType)t {

  NSString *requestString = [[r URL] absoluteString];

  if ([requestString hasPrefix: @"yourURLPrefix:"] ) {
      if ([requestString hasPrefix: @"yourURLPrefix:keyboardFix"] ) {
          [v.window makeKeyAndVisible];
      }
}

onFocus , , :

document.location = "yourURLPrefix:keyboardFix";
+3

, , , , , , , , , , . , ( ) , . , , .

, .

+2
0

, [(window) makeKeyAndVisible] .

makeKeyAndVisible, , , , - . NSLog(), , .

Window, .

0

All Articles