views:

183

answers:

1

Hey there,

I might be crazy, but for some reason this problem is stumping me.

I have a view controller that is set to auto rotate to orientation. Inside I've got two subviews. One is a uibutton. All I want is for my button's origin to stay locked to the bottom-left in portrait and bottom-right in landscape (so it basically stays in the same place).

It should also stay in place for portrait upside down and landscape right.

Any ideas?

Thanks, Howie

A: 

Use autoresizing.

KennyTM
thanks. I was actually looking for a way to do it programmatically.
Ward
@Ward: There's also `autoresizingMask` property for UIView which does the same thing.
KennyTM

related questions