Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-11-2010, 01:27 PM   #43 (permalink)
smasher
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Quote:
Originally Posted by iPhoneDevelopment View Post
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.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,473
Threads: 94,039
Posts: 402,624
Top Poster: BrianSlick (7,978)
Welcome to our newest member, iram91417
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:21 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.