PDA

View Full Version : Resizable image : lock height




Palad1
Oct 1, 2008, 07:59 AM
Hello,

I'd like to implement a scrollable, resizeable UIScrollView containing an UIImageView, but I would like the resize and pan operations to only work along the X axis.

Should I override a specific delegate and return a new image with the old height and the new width (might be a tad too Cpu-intensive?), or is there some option in UIScrollView I'm not aware of.

Cheers,
Palad1



Palad1
Oct 1, 2008, 09:17 AM
Solved:

UIScrollView *scrollView;
scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

:D