Capturing image of UIView (renderInContext not working properly) [closed]

混江龙づ霸主 提交于 2019-12-24 03:29:36

问题


I am trying to capture an image of a UIView with renderInContex, but it does not fully capture all of the subviews. (For example, it doesn't capture the words in a UITextView, and it doesn't capture a UIButton at all.)

What can I use instead?

Edit: The problem actually isn't renderInContext, but instead is my implementation. See my new question: https://stackoverflow.com/q/8865207/542687


回答1:


It sounds like renderInContext might work if you adjust the graphics context first. Try this if you haven't already done so: https://stackoverflow.com/a/3869804



来源:https://stackoverflow.com/questions/8860490/capturing-image-of-uiview-renderincontext-not-working-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!