2014-07-01 3 views
3

사용자 정의 키보드를 만들었습니다. 하지만 내 키보드가 내 iOS8 iPhone5S에 표시되지 않습니다UIInputViewController 키보드가 iOS 8에 표시되지 않음

아래 코드를 확인하십시오. 나는 틀린 무엇인가했다.

내 코드 :

// Perform custom UI setup here 
self.nextKeyboardButton = [UIButton buttonWithType:UIButtonTypeSystem]; 

[self.nextKeyboardButton setTitle:NSLocalizedString(@"Next Keyboard", @"Title for 'Next Keyboard' button") forState:UIControlStateNormal]; 
[self.nextKeyboardButton sizeToFit]; 
self.nextKeyboardButton.translatesAutoresizingMaskIntoConstraints = NO; 

[self.nextKeyboardButton addTarget:self action:@selector(advanceToNextInputMode) forControlEvents:UIControlEventTouchUpInside]; 

[self.view addSubview:self.nextKeyboardButton]; 

NSLayoutConstraint *nextKeyboardButtonLeftSideConstraint = [NSLayoutConstraint constraintWithItem:self.nextKeyboardButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0.0]; 
NSLayoutConstraint *nextKeyboardButtonBottomConstraint = [NSLayoutConstraint constraintWithItem:self.nextKeyboardButton attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0.0]; 



UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 
[button addTarget:self 
      action:@selector(aMethod:) 
forControlEvents:UIControlEventTouchUpInside]; 
[button setTitle:@"Show View" forState:UIControlStateNormal]; 
button.frame = CGRectMake(0.0, 0.0, 160.0, 160.0); 
[self.view addSubview:button]; 


[self.view addConstraints:@[nextKeyboardButtonLeftSideConstraint, nextKeyboardButtonBottomConstraint]]; 
+0

키보드 (시뮬레이터에서)를 전환하려면 Cmd + K를 누르십시오. – VietHung

답변

0

여기에 같은! 나는 그것이 iOS8 베타 버전의 버그라고 결론을 내렸다. 키보드 디스플레이가있는 앱을 종료하고 키보드를 다시 표시 한 다음 앱을 다시 시작하면 키보드가 정상적으로 표시됩니다.

2

이 단계를 수행 했습니까? 왜냐하면 그 일은 나를 위해 완벽하기 때문입니다. 더 찾을 수 있습니다 here

Use the toolbar to ensure that the active scheme specifies the containing app and an iOS Simulator device. 

Choose Product > Run, or click the Play button at the upper left of the Xcode project window. 
After the containing app and keyboard build and get installed in the simulator, you see the empty containing app running. 

In iOS Simulator, choose Hardware > Home to view Springboard. 
Go to Settings > General > Keyboard > Keyboards. 
Tap Add New Keyboard. 

In the Purchased Keyboards group, tap the name of your new keyboard. A modal view appears with a switch to enable your keyboard. 

Tap the switch to enable your keyboard. A warning alert appears. 
In the warning alert, tap Add Keyboard to finish enabling your new keyboard. Then tap Done. 
Choose Hardware > Home to view Springboard. 

In Springboard, pull down to reveal the Spotlight search field. 

In the system keyboard, now onscreen, tap and hold the globe key to show the list of enabled keyboards. Then tap on the custom keyboard you just installed. 
관련 문제