Quote:
Originally Posted by iPhoneDevelopment
If I put the 'float charBottom =' etc. before the 'for (UIImageView *block...', I need to re-declare 'block'. If I just put 'UIImageView *block;' the app crashes as soon as it is run. How do I declare 'block' for both the arrays before the for() statements?
Thanks
Cam
|
You don't need to declare "block" outside the loops; it's only used inside the loops. Calculating charBottom doesn't require that block is defined at all, that's why I moved it outside the loops. You still need to calculate blockTop inside the loops, since it's different for each block.