内容可编辑的UIWebView在iOS中的uiview按钮/图像上滚动和重叠(Content Editable UIWebView scrolls and overlaps over the butt

编程入门 行业动态 更新时间:2024-10-27 05:22:22
内容可编辑的UIWebView在iOS中的uiview按钮/图像上滚动和重叠(Content Editable UIWebView scrolls and overlaps over the button/images of uiview in iOS)

我有一个带有几个按钮的视图和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.

更多推荐

本文发布于:2023-07-26 03:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1270681.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   图像   编辑   uiview   UIWebView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!