tags:

views:

45

answers:

1

I'm trying to set an imageviews origin to offset from another imaeviews origin but am having no luck a all.. I wanna be able to offset the other imageview so it doesn't appear directly ontop of it but a little to the left or right of the images center and up a little bit.

here's my code.

imageView1.center = CGPointMake(imageView2.center.x + 20, imageView2.center.y + 35);

+1  A: 

probably easier to deal with origins...

    kOffset = 5;

    kWidth = 50

    kHeight = 50;

    CGRect frame = CGRectMake(0,0, kWidth, kHeight);

    UIImageView *theImage;


for(int i = 0; i<numberOfImages; i++){ 


    theImage = [[UIImageView alloc] initWithFrame:frame];

    frame.origin.x += (kWidth + kOffset);
}
Corey Floyd