0

I have a sets of customized images from A - Z, and I need to put the images as text onscreen, much like UILabel. So far I tried loading the images according to the string i need, and put it all on the screen. But it gets laggy and memory consumption is very high.

Is there anyway for me to pre-render the images A-Z, and whenever i need it i just specify a rectangular view which points to the A-Z images instead of loading a new one all the time?

Any direction is appreciated

TylerC
  • 95
  • 1
  • 6
  • Not much context ? Are you using a tableview ? scroll view ? We need more information as well as code snippets if we are to be of any use. – CW0007007 Sep 01 '15 at 11:26
  • You could try just creating your UIImages for each character, then storing them in an array (maybe with 26 entries). Then you could just render them by referring to the index in your array, For example, array item 0 would contain the UIImage for the letter "A". – Gismay Sep 01 '15 at 11:39
  • Read this http://stackoverflow.com/questions/5820445/does-ios-support-bitmap-font-in-any-form-to-use-in-uikit-classes – Blind Ninja Sep 01 '15 at 11:48
  • @Gismay will it duplicate the image? Let's say wanna add AAA to the screen, I refer the first index of the array and add it. Would the memory betreated as only one A instead of 3A's? – TylerC Sep 02 '15 at 02:01

1 Answers1

0

You can create you own custom font from your images and use it in application with standard UILable etc. http://mashable.com/2011/11/17/free-font-creation-tools/

Igor
  • 1,537
  • 10
  • 12
  • I can't convert to ttf because the customized alphabeth contains multiple color and it's not a in a vector format. – TylerC Sep 02 '15 at 02:02
  • As I know, the vector format is not required, you can make font with bitmap images – Igor Sep 02 '15 at 07:02