Search code examples
iphonecocoa-touchios6orientationuideviceorientation

Stop Autoresizing when UIDevice Orientation changes


I'm having a quite annoying problem with iOS 6.0. Everytime the IUDevice orientation changes some subviews autoresize even if not needed. In my particular case the only thing that autoresizes is UIButton, so what can i do stop this autoresize and if possible disable all autoresizes?

Cheers.


Solution

  • Remove autoresizing from all subview

    @By Code

    [subView setAutoresizingMask:UIViewAutoresizingNone];
    

    @By InterfaceBuilder

    enter image description here