pulling an UIImage from a UITextView or UILabel gives white image

前端 未结 2 631
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 08:13

I need to grab an UIImage from a UITextView or UILabel. I\'ve got a method that will pull an image successfully from other types of views ( [UIViewController view], MKMapView, U

2条回答
  •  佛祖请我去吃肉
    2021-02-09 09:10

    The technique is correct. Maybe it is because text is flipped. You could try to set a transform for the coordinate system and origin. Like you would normally do when drawing text.

提交回复
热议问题