私はObjective-Cを知らないので、PhoneGapを使ってiOSアプリケーションを作成しています。 iOSのPhoneGapには大きな欠陥があります。キーボードにはフォームアシスタント( 'next'、 'previous'、 'done'ボタンなど)が常にあります。これについての情報はほとんどありません。不可能。しかし、しばらくして、私はこのチュートリアルを見つけました。一番下の段落は、それを行う方法を説明しています。それが動作し、私はダウンロードし、完成したアプリをテストしました。iOS用のPhoneGapにこのスクリプトをインストールするには
しかし、私はXcodeやObjective-Cで何ができるのかわからないので、コードの2つのセクションがどのファイルに入っているのか分かりません。チュートリアルでは言いません。
PhoneGapのアプリケーションファイルのどこに誰に教えてもらえますか?私はそれを大いに感謝します、これは一日中私を悩ませています。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
そしてこの
RichTextEditorViewController *viewController = [[RichTextEditorViewController alloc] initWithNibName:@"RichTextEditorViewController" bundle:nil];
self.viewController = [[UINavigationController alloc] initWithRootViewController:viewController];
また、この
- (void)removeBar {
// Locate non-UIWindow.
UIWindow *keyboardWindow = nil;
for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) {
if (![[testWindow class] isEqual:[UIWindow class]]) {
keyboardWindow = testWindow;
break;
}
}
// Locate UIWebFormView.
for (UIView *possibleFormView in [keyboardWindow subviews]) {
// iOS 5 sticks the UIWebFormView inside a UIPeripheralHostView.
if ([[possibleFormView description] rangeOfString:@"UIPeripheralHostView"].location != NSNotFound) {
for (UIView *subviewWhichIsPossibleFormView in [possibleFormView subviews]) {
if ([[subviewWhichIsPossibleFormView description] rangeOfString:@"UIWebFormAccessory"].location != NSNotFound) {
[subviewWhichIsPossibleFormView removeFromSuperview];
}
}
}
}
}
ありがとうございました!
Wordを追加します。 obj-cを学ぶと、もっと幸せになれます。 –