I'm using the following function:
CGSize s= [string drawInRect:CGRectMake(0, 0, w, h) withFont:font lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter];
string
is a NSString and when this method is called - the iPhone is hangs for some time.
I've set good values for the parameters.
For a test, I wrote a loop with 99 iterations and call only this method inside loop.
It hangs on iteration 15, and some others.
When I remove the loop in my App it hangs so rarely that is practically impossible to catch as it appears at the most inopportune moments.
I have no idea. :(