2

キーボード上に「次へ」および「前へ」ボタンを実装するにはどうすればよいですか。私は使用UITextViewし、「次へ」をクリックすると、次の TextView がフォーカスされ、前の最後の TextView がフォーカスされます。

インターネットでチュートリアルが見つかりません。

みんなが私を助けてくれることを願っています。

4

2 に答える 2

1

このカスタム コントロールを使用してください

ココア

ヘルプが必要な場合はお知らせください。

このコントロールは非常に使いやすいです。

更新された回答

ボタンのラベルを変更する

BSKeyboardControls.mファイルに移動して、次の変更を行います

オンライン No. 42

 [self setSegmentedControl:[[UISegmentedControl alloc] initWithItems:@[ NSLocalizedStringFromTable(@"<", @"BSKeyboardControls", @"Previous button title."),
                                                                               NSLocalizedStringFromTable(@">", @"BSKeyboardControls", @"Next button title.") ]]];

51号線

   [self setDoneButton:[[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"Ok", @"BSKeyboardControls", @"Done button title.")
                                                         style:UIBarButtonItemStyleDone
                                                        target:self
                                                        action:@selector(doneButtonPressed:)]];

///// * ** * ** * ** 更新 2** * ** * *** //////////// 前と次の画像を設定

行番号の後に次のコードを追加するだけBSKeyboardControls.mです。52

    [self.segmentedControl setImage:[UIImage imageNamed:@"add.png"] forSegmentAtIndex:BSKeyboardControlsDirectionPrevious];
    [self.segmentedControl setImage:[UIImage imageNamed:@"add.png"] forSegmentAtIndex:BSKeyboardControlsDirectionNext];
于 2013-09-13T10:45:21.230 に答える
0

BSKeyboardControls.mファイルを変更して、次の変更を行います

これを取り除く

// [self setRightArrowButton:[[UIBarButtonItem alloc] initWithBarButtonSystemItem:106 target:self action:@selector(selectNextField)]];

これを追加

        [self setRightArrowButton:[[UIBarButtonItem alloc]initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:self action:@selector(selectNextField)]];
于 2015-01-24T06:41:24.643 に答える