我有一个带有几个按钮的视图和UIWebView,它们加载了内容可编辑的HTML。 在UIWebView中,我使用本机和JavaScript功能插入images / Canvas。
由于只要单击webview,WebView就可以编辑,因此会出现键盘。 现在,当我们插入/编辑图像/画布时,键盘应该隐藏。 因此,我正在检查tap事件,在该位置获取元素的id,并使用[webview endEditing:YES];隐藏键盘(如果是图像/画布)。
现在我面临的问题是,如果我添加2-3个图像然后点击webview,webview开始从其位置移动并重叠保存在uiview的按钮/图像。 因此按钮不可见,我无法执行与此相关的操作。
I have a view with few buttons and UIWebView which loaded content editable HTML. In UIWebView i am inserting images/Canvas using both native and javascript functionality.
Since the WebView is editable whenever webview is clicked keyboard comes up. Now when we are inserting/editing a image/canvas keyboard should hide. So for that i am checking for tap event, getting the id of the element at that position and hiding the keyboard if that is a image/canvas using [webview endEditing:YES];.
Now the problem what i am facing is that if i add 2-3 images and then clicks on the webview, webview starts moving from its position and overlaps the button/images kept at the uiview. So the button are not visible and i am not able to perform the actions related to that.
最满意答案
问题解决了。 当键盘显示/隐藏时,我正在使用某种动画。 一旦我删除uiwebview不移动。
Issue resolved. I was using some kind of animation when the keyboard was show/hidden. Once i removed that uiwebview doesn't moves.
更多推荐
发布评论