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