I use something like this in my code
Btn.autoresizingMask = UIViewAutoresizingFlexibleTopMargin + UIViewAutoresizingFlexibleLeftMargin;
It works great for all versions of iOS except iOS 7.
UIViewAutoresizingFlexibleTopMargin also works, but UIViewAutoresizingFlexibleLeftMargin does not work.
If someone decides this, please help.
Thanks.
source share