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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 01-30-2010, 02:32 PM   #13 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Quote:
Originally Posted by iPhoneDevelopment View Post
Awsome, thanks! You are teaching me so much! Right, now on to stacking the blocks!

(P.S. Is there any way to randomise the size of the falling blocks??)
UIImageView inherits from UIView, so you can use any UIView properties or methods. To change the size of a block you could change the "frame" property or you could change the "transform" property. I'd do this just before you set the center of the new block.

Code:
//change the frame
CGRect newFrame = block.frame;
int newSize = arc4random() % 32 + 1; // returns a number from 1 to 32
newFrame.size = CGPointMake(newSize,newSize);
block.frame = newFrame;
I'll do the stacking later today.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 292
15 members and 277 guests
ADY, aikhan, astalavista, chemistry, chits12345, dcool, Joseph Nardone, leahov, mer10, NSeven, padsoftware, Paul10, pavanindira, Promo Dispenser, RoryHarvey
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,219
Posts: 380,705
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

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