displaying suggestion toolbar above ios keyboard
Asked Answered
W

2

4

I am a newbie in iOS development. I am trying to create a spell suggestion type application in ios 5.1 having a textView such that if user taps on a key of the keyboard a suggestion toolbar come at the top of the keyboard containing all the suggestions and if user taps onto one of those suggestions it will be displayed on the textView .

Like the one shown in figure.

enter image description here

I have handled the keyboard press event and handled all processing over there. Now what i want to do is that i have a NSArray of suggestions and I want to create a suggestion toolbar and assign all those suggestion from NSArray to that toolbar and also if user taps on any of those suggestion it should be placed on the textView.

I am unable to understand how should i proceed with that and which component should i use to create that toobar above the keyboard.

using IOS SDK 5.1 and xcode 4.3

Whole answered 15/5, 2012 at 5:51 Comment(0)
O
3

You can make a view stick to the top of the keyboard by making it the inputAccessoryView for whichever text editing controls (UITextField, UITextView, etc) you want it to appear with. See the UITextInputTraits protocol docs for details.

If you're not sure where to start on making a view showing words which can be tapped, you might want to look at the View Programming Guide or a good intro-to-iOS-programming book.

Over answered 15/5, 2012 at 5:57 Comment(0)
O
1

You can use accessory view of keyboard to achieve this, check out this developer same code- http://developer.apple.com/library/ios/#samplecode/KeyboardAccessory/Introduction/Intro.html

Organization answered 15/5, 2012 at 5:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.