I have been playing around with iPhone interface building using only code and not using IB.
Now I\'m facing the following problem:
How can I set an image to
Horizontally:
UIViewAutoresizingFlexibleWidthUIViewAutoresizingFlexibleRightMarginUIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMarginUIViewAutoresizingFlexibleLeftMarginVertically:
UIViewAutoresizingFlexibleHeightUIViewAutoresizingFlexibleBottomMarginUIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMarginUIViewAutoresizingFlexibleTopMarginCombine one from the first section with one from the second with a |. For example, to have it resize horizontally and keep the same size and distance from the top vertically, you'd use UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin.
You can use other combinations to do some more tricky things, but those are the basics.
You probably want this:
[myImageView setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
That will keep the margins static and resize the width.