2016-09-09 5 views
5

iOS 10에서 키보드의 설정 화면을 프로그래밍 방식으로 여는 방법은 무엇입니까?iOS 10에서 키보드의 설정 화면을 프로그래밍 방식으로 여는 방법은 무엇입니까?

이 코드는

NSURL *keyboardSettingsURL = [NSURL URLWithString: @"prefs:root=General&path=Keyboard/KEYBOARDS"]; 
    [[UIApplication sharedApplication] openURL:keyboardSettingsURL]; 

아이폰 OS (10)

에서 작업하고 당신은 당신이 이미하지 않은 경우 프로젝트에 URL 스키마를 추가해야 할 수 있습니다 URL 계획을

답변

0

을 추가되지 않습니다. 지침 및 자세한 내용은 Apple Q&A Reference에서 확인할 수 있습니다. 희망이 도움이!

+0

URL Scheme을 이미 추가했지만 작동하지 않습니다. – Rachit

+0

사용 해보았습니까 prefs : root = General & path = Keyboard/KEYBOARDS "'? –

+0

"prefs : root = General & path = Keyboard"도 작동하지 않습니다. – Rachit

4

iOS 10에서이 기능이 사용 중지 된 것으로 보입니다. https://developer.apple.com/library/content/qa/qa1924/_index.html은 (는) 더 이상 유효하지 않습니다. 몇 가지 최고의 키보드 응용 프로그램을 확인하고 더 이상 환경 설정에 직접 링크가 없도록 업데이트되었거나 작동하지 않는 버튼이 있습니다.

0

iOS 10에는 새로운 URL이 필요합니다.

NSArray* urlStrings = @[@"prefs:root=General&path=Keyboard/KEYBOARDS", @"App-Prefs:root=General&path=Keyboard/KEYBOARDS"]; 
for(NSString* urlString in urlStrings){ 
    NSURL* url = [NSURL URLWithString:urlString]; 
    if([[UIApplication sharedApplication] canOpenURL:url]){ 
     [[UIApplication sharedApplication] openURL:url]; 
     break; 
    } 
} 
2

는 아이폰 OS에 작품 10 +

NSURL *keboardURL = [NSURL URLWithString: @"App-Prefs:root=General&path=Keyboard/KEYBOARDS"]; 
[[UIApplication sharedApplication] openURL:keyboardURL]; 

핵심 포인트 : "앱의 환경 설정 @

: 두 URL을 테스트 코드를 사용해보십시오 루트 = 일반 & 경로 = 키보드/KEYBOARDS "

0
For IOS-10 or higher,openURL is deprecated. use with completion handler like below. 

NSString *settingsUrl= @"App-Prefs:root=General&path=Keyboard"; 
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0){ 
    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:settingsUrl]]) { 
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:settingsUrl] options:@{} completionHandler:nil]; 
    } 
}