How do I use the NSString draw functionality to create a UIImage from text

后端 未结 4 1507
说谎
说谎 2020-11-28 02:59

I would like to draw the content of a NSString variable in a UIImage, but I have absolutely no idea how to do this. I need to write a method that w

4条回答
  •  野性不改
    2020-11-28 03:47

    Begin an image context with UIGraphicsBeginImageContext, draw to it, get an image with UIGraphicsGetImageFromCurrentImageContext, end it with UIGraphicsEndImageContext

提交回复
热议问题