iOS2012. 10. 24. 10:47


iOS6에서 shouldAutorotateToInterfaceOrientation가 deprecated되었답니다.

그래서 대안으로 나온게 아래 코드입니다.

shouldAutoRotate와 supportedInterfaceOrientations를 조정하면 된다네요.


아래 코드는 iOS5에서 가로모드만 지원하도록 하는 예이고.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

    return UIInterfaceOrientationIsLandscape(interfaceOrientation);

}


아래 코드는 iOS6에서 가로모드만 지원하는 예입니다.

- (BOOL) shouldAutoRotate{

    return YES;

}


- (NSUInteger)supportedInterfaceOrientations {

    //    UIInterfaceOrientationMaskLandscape;    24

    //    UIInterfaceOrientationMaskLandscapeLeft;    16

    //    UIInterfaceOrientationMaskLandscapeRight;    8

    //    UIInterfaceOrientationMaskPortrait;    2

    return 24;

}



Posted by 삼스

댓글을 달아 주세요

  1. Nike Giants Jersey

    http://www.texanssportshop.com http://www.texanssportshop.com
    http://www.texanssportshop.com/jj-watt-jersey-c-1_127.html J.J. Watt Jersey
    http://www.texanssportshop.com/andre-johnson-jersey-c-1_13.html Andre Johnson Jersey
    http://www.texanssportshop.com/arian-foster-jersey-c-1_31.html Arian Foster Jersey
    http://www.texanssportshop.com/brian-cushing-jersey-c-1_55.html Brian Cushing Jersey
    http://www.texanssportshop.com/johnathan-joseph-jersey-c-1_139.html Johnathan Joseph Jersey
    http://www.texanssportshop.com/whitney-mercilus-jersey-c-1_217.html Whitney Mercilus Jersey
    http://www.texanssportshop.com/alan-ball-jersey-c-1_2.html Alan Ball Jersey
    http://www.texanssportshop.com/antoine-caldwell-jersey-c-1_19.html Antoine Caldwell Jersey
    http://www.texanssportshop.com/antonio-smith-jersey-c-1_25.html Antonio Smith Jersey
    http://www.texanssportshop.com/ben-tate-jersey-c-1_37.html Ben Tate Jersey
    http://www.texanssportshop.com/bradie-james-jersey-c-1_43.html Bradie James Jersey
    http://www.texanssportshop.com/brandon-brooks-jersey-c-1_49.html Brandon Brooks Jersey
    http://www.texanssportshop.com/brice-mccain-jersey-c-1_61.html Brice McCain Jersey
    http://www.texanssportshop.com/brooks-reed-jersey-c-1_67.html Brooks Reed Jersey
    http://www.texanssportshop.com/chris-myers-jersey-c-1_73.html Chris Myers Jersey
    http://www.texanssportshop.com/connor-barwin-jersey-c-1_79.html Connor Barwin Jersey
    http://www.texanssportshop.com/danieal-manning-jersey-c-1_85.html Danieal Manning Jersey
    http://www.texanssportshop.com/derek-newton-jersey-c-1_91.html Derek Newton Jersey
    http://www.texanssportshop.com/devier-posey-jersey-c-1_97.html Devier Posey Jersey
    http://www.texanssportshop.com/donnie-jones-jersey-c-1_103.html Donnie Jones Jersey
    http://www.texanssportshop.com/duane-brown-jersey-c-1_109.html Duane Brown Jersey
    http://www.texanssportshop.com/garrett-graham-jersey-c-1_115.html Garrett Graham Jersey
    http://www.texanssportshop.com/glover-quin-jersey-c-1_121.html Glover Quin Jersey
    http://www.texanssportshop.com/james-casey-jersey-c-1_133.html James Casey Jersey
    http://www.texanssportshop.com/kareem-jackson-jersey-c-1_145.html Kareem Jackson Jersey
    http://www.texanssportshop.com/kevin-walter-jersey-c-1_151.html Kevin Walter Jersey
    http://www.texanssportshop.com/lestar-jean-jersey-c-1_157.html Lestar Jean Jersey
    http://www.texanssportshop.com/matt-schaub-jersey-c-1_163.html Matt Schaub Jersey
    http://www.texanssportshop.com/owen-daniels-jersey-c-1_169.html Owen Daniels Jersey
    http://www.texanssportshop.com/quintin-demps-jersey-c-1_175.html Quintin Demps Jersey
    http://www.texanssportshop.com/shaun-cody-jersey-c-1_181.html Shaun Cody Jersey
    http://www.texanssportshop.com/shayne-graham-jersey-c-1_187.html Shayne Graham Jersey
    http://www.texanssportshop.com/tj-yates-jersey-c-1_193.html T.J. Yates Jersey
    http://www.texanssportshop.com/tim-jamison-jersey-c-1_199.html Tim Jamison Jersey
    http://www.texanssportshop.com/trindon-holliday-jersey-c-1_205.html Trindon Holliday Jersey
    http://www.texanssportshop.com/wade-smith-jersey-c-1_211.html Wade Smith Jersey

    2012.11.28 17:52 [ ADDR : EDIT/ DEL : REPLY ]
  2. 눈을 감아봐 입가에 미소가 떠오르면 네가 사랑하는 그 사람이 널 사랑하고 있는거야.

    2013.07.11 02:08 [ ADDR : EDIT/ DEL : REPLY ]
  3. 사람들은 죽을걸 알면서도 살잖아 .사랑은 원래 유치한거에요

    2013.07.13 23:02 [ ADDR : EDIT/ DEL : REPLY ]