0
votes

It's as simple as it sounds. I have a custom UIScrollView class with a UIImageView subview (standard). The UIImageView contains a UIView (derived class) as a subclass with a custom drawRect call.

On the simulator, everything works fine: scrollview displays, pans, zooms; the image fills the contents of the scrollview; and my UIView draws on top of the image.

On my iPod touch, whenever this view loads, the program crashes. No error message or stack trace. No debug breaks anywhere. No out of memory warnings. The program just simply quits.

Here's the kicker: If I delete all the contents from the drawRect function so that it's completely empty, it still crashes (I've also tried leaving just [super drawRect] with no avail). But, if I delete the entire method completely, then it runs on the iPod fine--not crashing, but not displaying my custom draw either.

Anyone know why??

1

1 Answers

0
votes

Why I think it was crashing: memory issues.

My solution: build my custom UI out of UILabels and UIImageViews. Displayed much faster anyway and fixed the problem.