UIWebView在文本域焦点后滚动 [英] UIWebView's scrolling after textfield focus

查看:109
本文介绍了UIWebView在文本域焦点后滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在屏幕上有 UIView UIWebView 。当我点击网站上的文本字段时,网页视图内容就会上升。我怎么能强迫 UIView 移动呢?

I have UIView and UIWebView on screen. When I click on text field in website, web view content is going up. How could I force UIView to move as well then?

推荐答案

您可以订阅 UIKeyboardWillShowNotification UIKeyboardDidShowNotification ,并在收到通知时移动 UIView 。此过程如下所述:

You can subscribe to either the UIKeyboardWillShowNotification or the UIKeyboardDidShowNotification, and move your UIView when you receive the notification. This process is described here:

文本,Web和编辑iOS编程指南:移动位于键盘下的内容

Text, Web, and Editing Programming Guide for iOS: "Moving Content That Is Located Under the Keyboard"

这篇关于UIWebView在文本域焦点后滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆