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.
Asked
Active
Viewed 56 times
1 Answers
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.
-
I'm trying to make this for OSX. Is there an equivalent of UIView and UIImage that I can use? – SilentLupin Sep 08 '13 at 23:59
-
Take a look at NSView and NSImage. – yury.ku Sep 09 '13 at 12:43