/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
float x,y; float space = kSpacing; float width = rect.size.width; int ct = [_images count]; float totalspace = (ct-1)*space; x= (width/2) - (totalspace/2);//find the starting CENTER of first point y = rect.size.height/2; for (UIImage *img in _images) { CGSize sz = img.size; CGPoint pt = CGPointMake(x - sz.width/2, y - sz.height/2); NSLog(@"pt: %@",NSStringFromCGPoint(pt)); [img drawAtPoint:pt]; x+=space; }
Comments
