응용 프로그램의 모든 페이지는 potrait 모드에 있어야합니다. 하지만 특정 페이지에서, 당신은 webview에서 튜브 비디오를로드하고 있습니다. 비디오를 클릭하면 mpmovie 플레이어 컨트롤러에 비디오가 표시되고 가로 모드로이 비디오를 표시합니다. 내가 어떻게 할 수 있니? 어떤 도움이라도 대단히 감사 할 것입니다.potrait 모드에서 내 viewcontroller 모든 응용 프로그램의 가로보기 모드에서 특정 viewcontroller 싶습니다
답변
당신은 당신이 당신의보기를 선택할 수있는 스토리 보드를 사용하는 경우 당신은 내가 그 일을 생각 가로 모드에있을 필요가 뷰 컨트롤러의 viewDidLoad에서이 라인 ...
if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
objc_msgSend([UIDevice currentDevice], @selector(setOrientation:), UIInterfaceOrientationLandscapeLeft);
}
그게 나를 위해 일하고 – Rafay
내 편집 된 답변 확인 ... –
을 넣어야 할 속성 관리자에서 "추론"대신 원하는 방향을 선택할 수 있습니다. 당신은 스토리 보드에없는 경우
난 당신이 어쩌면이
webview.orientation = UIOrientationPortrait (haven't tried it but it must be pretty similar)
웹뷰의 오리엔테이션 속성을 찾지 못했습니다 .. – Rafay
도움이 되나요? http://stackoverflow.com/questions/2325795/webview-resizes-automatically-to-portrait-and-landscape-view-in-iphone 한 번 회전 된 웹보기의 크기를 조정하는 방법에 대해 알아야합니다. shouldAutorotateMethod를 사용하여 회전합니다. 하지만 테스트가 필요하고 지금 당장 시간이 없어. 나는 너에게 보여줄 길을 찾고있다. –
- 1. 가로 모드에서 하나의 ViewController 만 설정하십시오.
- 2. Android : 응용 프로그램의 모든 활동에 동일한 가로보기
- 3. 하나의 ViewController 만있는 XIB에서 전환
- 4. 가로보기 모드에서 uiTableView를 모달보기로 추가
- 5. 풍경과 potrait 모드에서 MPMoviePlayerController 만 만드는 방법
- 6. ViewController 대 ViewController 편집
- 7. 특정 ViewController 버튼
- 8. 내 viewController 문제 업데이트?
- 9. container ViewController with Scrolling ViewController
- 10. ActionBarSherlock : 탭이 가로보기 모드에서 맞춤보기를 잃습니다.
- 11. ViewController 아키텍처
- 12. 가로보기 모드에서 비디오보기가 전체 화면이 아닙니다. iPhone
- 13. 잘못된 viewcontroller
- 14. UIVIewController 내 FormSheet ViewController 표시
- 15. 가로 모드에서 세로보기 모드에서 새보기 창 추가
- 16. ViewController + Table ViewController + Master-Detail app 닫기
- 17. ViewController B에서 ViewController A로 데이터 전달
- 18. ViewController 대보기
- 19. viewcontroller inheritance
- 20. Switching ViewController
- 21. Release ViewController
- 22. IOS하십시오의 ViewController
- 23. Xib ViewController
- 24. 의 ViewController
- 25. 다른 viewController, Swift를 통해 viewController 표시
- 26. ViewController iOS6에서 회전하지 않음
- 27. ViewController 바꾸기
- 28. 모달 viewController
- 29. 의 ViewController
- 30. 상태 표시 내 AppDelegate에에서의 ViewController
같은 것을 사용할 수 있습니다 확신 해요, 당신은 여기에 대한 답변 http://stackoverflow.com/questions/20372223/maintain을 찾을 수 있습니다 -one-view-controller-in-portrait 및 other-in-landscape-mode-ios http://stackoverflow.com/questions/16392021/first-uiview-in-portrait-orientation-and-second-in -landscape? rq = 1 – Oleshko
유사한 질문에 대한 내 대답을 확인하십시오 - http://stackoverflow.com/questions/23491426/ios-7-how-to-allow-only-portrait-orientation-for-vc/23491583#23491583 – Bharat