捕获UIView的图像(renderInContext工作不正常)

我正在尝试使用renderInContex捕获一个UIView的图像,但它不能完全捕获所有的子视图。 (例如,它不捕获UITextView的单词,并且根本不捕获UIButton 。)

我可以用什么来代替?

编辑:问题其实不是renderInContext ,而是我的实现。 看到我的新问题: https : //stackoverflow.com/q/8865207/542687

听起来像renderInContext可能工作,如果你先调整graphics上下文。 试试这个,如果你还没有这样做: https : //stackoverflow.com/a/3869804