Reputation: 2912
i have a imageView which can be touched and dragged by the user so that he can place it in another place. I want to increase the size of the imageView(or highlight) when the image is being touched (or dragged) by the user. is there anyway i can do it??? Thankyou
Upvotes: 0
Views: 397
Reputation: 19323
In your method where you want to increase the size, do:
CGRect newFrame = theImgView.frame;
newFrame.size.width += increaseInWidth;
newFrame.size.height += increaseInHeight;
theImgView.frame = newFrame;
note that the contentMode of the image view should be "Scale To Fill" or "Aspect Fill" if you want the image to get bigger, and not just the frame of the image view :)
Highlight can be done by placing a semi-transparent UIView (opaque = NO; alpha = 0.5) on top of the ImageView.
Upvotes: 3