在 iPad 上截取部分屏幕截图
我试图在保存时截取屏幕截图,但只能全屏显示。有什么办法可以截取部分截图吗?
这是一个示例。假设我只想截取红色突出显示部分的屏幕截图。感谢您的帮助。
I'm trying to take a screenshot on save, but can only do full screen. Is there any way to take a partial screenshot?
Here is a sample. Say I just want to take a screenshot of the section highlighted in red. Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您想要该网页视图的屏幕截图。如果您想获取特定视图的图像,并且仅获取该视图(+子视图),则可以使用以下代码:
只需将 Web 视图传递给该函数,它就应该可以工作。
编辑:
假设这只是一个示例图像,并且您想要一个未包含在其自己的视图中的区域的屏幕截图,请使用 Canada Dev 的解决方案。将图像裁剪到您想要的区域。
It looks like you want a screenshot of that web view there. If you want to get an image of a specific view and only that view (+ subviews), you can use the following code:
Just pass the web view to that function and it should work.
EDIT:
Assuming that was just an example image and you want a screenshot of an area that is not contained in its own view, go with Canada Dev's solution. Crop the image to the area that you want.