0
가로 모드에서 Aviary SDK 사진 편집기를 점심 먹으려 고하는데 iPad에서만 작동합니다! 아이폰에 내 응용 프로그램 충돌이 문제로 인해 :Aviary SDK 장치 방향 관련 문제
'UIApplicationInvalidInterfaceOrientation'이유 : ' 방향을 지원하는 응용 프로그램에 공통 방향이 없으며, shouldAutorotate은 YES 반환'이
내가 다른 시도 방법하지만 성공 : 이러한 코드의
- (IBAction)photoEditor:(id)sender {
[self displayEditorForImage:imageBG.image];
}
- (void)displayEditorForImage:(UIImage *)imageToEdit
{
//set device orientation
[AFPhotoEditorCustomization setSupportedIpadOrientations:@[@(UIInterfaceOrientationLandscapeRight),
@(UIInterfaceOrientationLandscapeLeft) ]];
AFPhotoEditorController *editorController = [[AFPhotoEditorController alloc] initWithImage:imageToEdit];
[editorController setDelegate:self];
[self presentViewController:editorController animated:YES completion:nil];
}
아무도 일하지 :
1
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeLeft));
}
2
-(BOOL)shouldAutorotate
{
return UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskLandscapeLeft;;
}
3
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationLandscapeRight | UIInterfaceOrientationLandscapeLeft; // add any other you want
}
-(BOOL)shouldAutorotate
{
//tried NO too ,
return YES ;
}
내 응용 프로그램은 조류 사육장 자주 묻는 질문에서 어떤 도움
여전히 충돌합니다! 심지어 하위 클래스를 만들고 shouldRotate를 NO로 설정했습니다. 하지만 여전히 충돌! –
@ Mc.Lover 의도적 인 동작입니다. SDK는 가로 모드로 실행할 수 없습니다. 지원되는 방향에'UIInterfaceOrientationPortrait'을 추가해야합니다. – Sulthan
@SulthanIs 어쨌든 지원되는 방향에서 인물을 선택 취소 하시겠습니까? 이 옵션 화면이 회전하고'shouldAutoRotate' 및 다른 화면 회전 잠금 코드가 작동하지 않을 경우 내 앱이 가로 모드에서만 실행되기 때문에 !!!! –