Reputation: 1095
How would you change just the width of a UIImageView in objective-c? Currently I'm doing this:
imageview.frame = GCRectMake(x,y,width,height);
But when I change the width it seems to just change the position rather then change the size.
Upvotes: 1
Views: 3857
Reputation: 58458
try this:
CGRect frame = [imageView frame];
frame.size.width = newWidth;
[imageView setFrame:frame];
Upvotes: 7