0

I'm trying to create an image made out of text in objective c, but I can't figure out how to put the text onto a new image. The basic idea is that it's going to be shapes made out of text, so I need to be able to specify points. Currently I am trying to do it with a bitmap, but the format doesn't really matter. I may be missing something simple, but any suggestions would be appreciated.

SilentLupin
  • 658
  • 10
  • 16

1 Answers1

0

One approach is to render your text and other things to a custom UIView. After that, you can capture that UIView to a UIImage.

This answer on SO will help in terms of rendering the UIView to UIImage. There are various tutorials about rendering a custom UIView. You may just want to override a particular component as well such as overriding the UITextField.

For OSX, you'd want to look into NSView and NSImage - this answer may help.

Community
  • 1
  • 1
NG.
  • 22,560
  • 5
  • 55
  • 61