在Web视图顶部绘制覆盖视图 [英] Drawing overlay view on top of a web view
问题描述
我正在尝试创建一个可以注释PDF的应用。
我所做的是通过UIWebview添加PDF,所以我的主要UIViewController有一个UIWebView委托。
我想要做的是将我的绘图图层放在PDF视图的顶部。
我尝试将背景颜色设置为clearColour,将opaque属性设置为no,我仍然会得到一个奇怪的效果。
我认为问题可能是因为在UIView上绘制了一个位图,但我仍然想要一些见解,或者如果存在一个例子。
谢谢。
这是问题的图像,顶部的小白带是PDF,白框是我正在使用的UIView。
我用于绘图代码的代码在这里,参见SmoothedBIView
可以帮助你。
I am trying to make an app that can annotate PDFs.
What I have done, is add the PDF through a UIWebview, so my main UIViewControllerhas a UIWebView Delegate.
What I am trying to do is put my drawing layer, which is a UIView over the top of my PDF view.
I have tried setting the background colour to "clearColour" and the opaque property to no, I still get a weird affect.
I think the issue might be because of drawing a bitmap onto the UIView, but I would still like some insight, or an example if one exists.
Thanks.
This is an image of the problem, the little white band at the top is the PDF, the white box is the UIView which I am drawing on.
The code I used for the "drawing code" is here, see "SmoothedBIView"
http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_freehand-drawing/
Sorry, just noticed you had two questions. Again maybe this project can help you.
这篇关于在Web视图顶部绘制覆盖视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!