放大 UIScrollView 时如何停止模糊?

发布于 2025-01-02 12:50:28 字数 583 浏览 1 评论 0原文

我一直在尝试找出放大视图时如何重绘视图,我已经查看了许多示例(主要是本机代码),但仍在努力使其完全正常工作。

所以让我尝试解释一下我正在尝试的内容...... 我有一个 UIScrollView ,里面有一个 UIView(container) ,这里面又有很多视图,每个视图里面都有 UITextFields ,我正在寻找的功能是当用户单击它放大的任何视图然后返回时当用户完成后就位,除了放大视图的质量很糟糕之外,一切实际上都工作正常。 我正在使用 UIScrollViewDelegate 但不太确定在 ZoomedEnded 函数中放入什么来处理重绘,我尝试过使用 CATiledLayer 但不太确定如何使用它,而且我总是以黑屏结束。 没有太多代码可以显示为

svCertScroller.SetZoomScale(2.34f, true);

正常工作,并且在 UIScrollDelegate 事件 ViewForZoomingInScrollView 中仅返回我想要放大的视图,但目前我尝试加载但在 ZoomingEnded 事件中没有任何内容,但似乎没有任何内容可以接近。 因此,任何有关在该事件中添加什么内容以增强放大视图的帮助都会很棒。 提前致谢。

I have been trying to find out how to redraw a view when i have zoomed in on it, i have looked at many examples (mainly native code) but am still struggling to get it fully working.

So let me try and explain what i am attempting....
I have a UIScrollView With a UIView(container) in it this in turn has many views within it each with UITextFields inside, the functionality i am looking for is when a user clicks on any of the view it is zoomed in on and then goes back into place when the user is finished with it which does all actually work fine except for the quality of the zoomed in view is terrible.
I am using a UIScrollViewDelegate but not really sure what to put in the ZoomedEnded function to handle the redraw, I have tried using the CATiledLayer but am not really sure how this is used and i always just end up with a black screen.
There is not much code to show as

svCertScroller.SetZoomScale(2.34f, true);

Works fine and in the UIScrollDelegate event ViewForZoomingInScrollView just returns the view i want zoom in on but i don't have anything in ZoomingEnded event at the moment I have tried loads but nothing even seems to get close.
So any help on what to put inside this event to sharpen up the zoomed in view would be great.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉薄对峙 2025-01-09 12:50:28

使滚动画布更大并以更高的分辨率绘制内容。

Make the scroll canvas larger and plot the contents at a higher resolution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文