Search code examples
iosnsstringuilabelsettext

Is the most efficient way to constantly update a label on screen to simply change the label's text property?


Say I have to update a label 1000 times a minute. Completely change its string value. Am I best off making 1000 setText: calls per minute? Or is there a more efficient way? Perhaps doing away with labels completely?


Solution

  • You basically have two options - update the textproperty of a UILabel or draw an NSString directly onto a UIView (after first erasing the previous value). You'll have to run some tests to see which is more efficient.