영어로 새로 제공됩니다.가로 모드에서 하나의 ViewController 만 설정하십시오.
viewController
은 landscape
모드에 하나만 표시하고 싶습니다.
그럼 어떻게 도와 주시겠습니까? landscape
모드에서 하나의보기 만 변경할 수 있습니다.
나는 이미 검색했지만 특정 답변을 찾지 못했습니다.
는 iOS6영어로 새로 제공됩니다.가로 모드에서 하나의 ViewController 만 설정하십시오.
viewController
은 landscape
모드에 하나만 표시하고 싶습니다.
그럼 어떻게 도와 주시겠습니까? landscape
모드에서 하나의보기 만 변경할 수 있습니다.
나는 이미 검색했지만 특정 답변을 찾지 못했습니다.
는 iOS6이 ViewController
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
감사 Mindaugas의가! 내가 이미 그것을 –
당신이 UINavigationController가를 사용하고 당신이 방법을 추가?
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
-(BOOL) shouldAutorotate {
return YES;
}
감사 Markm을 할 수있다! 네, 내비게이션 컨트롤러를 사용하고 있습니다 –
시도해 봅니다. 그러나 제대로 작동하지 않습니다. –
당신이 탐색 컨트롤러이 '풍경 중심의'뷰 컨트롤러를 추진하고있다 컨트롤러를 사용하는 경우는 다음 CGAffineTransformation으로 UIView의 회전을 수동으로해야합니다에만 세로 모드에 있습니다. 보정
- (void)viewDidLoad
{
[super viewDidLoad];
// If you require full screen then hide the navigation bar with following commented line.
//[self.navigationController setNavigationBarHidden:YES animated:NO];
// Rotates the view.
CGAffineTransform transform = CGAffineTransformMakeRotation(-M_PI/2);
self.view.transform = transform;
// Repositions and resizes the view.
// If you need NavigationBar on top then set height appropriately
CGRect contentRect = CGRectMake(0, 0, 480, 320);
self.view.bounds = contentRect;
}
답장을 보내 주셔서 감사합니다! BUY sory 그게 나를 위해 작동하지 않습니다 –
@Abid, 당신은 저를 구해 주셔서 감사합니다 ... –
감사합니다 .. .. 그 일하는 awesomeeeeee ... 나는 많은 시간을 보냈다. 아주 좋은 답변 .. 그것은 나를 위해 잘하고있다. – Surya
감사 Rotim ...... –