uiwebview's displacement value after focus & keyboard appearance
I have UIWebView among with other UI elements on the screen. After I click on textfield inside a webview, whole webview is moving up (it is moving webview content, not a webview containter, right?). Is there possibility to find a displacement value after showing up a keyboard to move other elements as well? I am gett开发者_如何学Pythoning uiwebview's layer position values before/after keyboard appereance but there are not seeming to be changing...
btw. what's, in short, difference between layer and frame?
Thanks for any help.
My solution:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(resize:) name:UIKeyboardWillShowNotification object:nil];
(void) test
{
CGRect rect = CGRectMake(0,0,320,460);
self.webView.scrollView.bounds = rect;
}
(void) resize:(id)sender
{
[self performSelector:@selector(test) withObject:nil afterDelay:0];
}
精彩评论