ToolBar on top of keyboard - objective-c

How can i show toolbar with "Next" and "Previous" buttons on top of the keyboard on iPad like in ShareKit(when logging in)? I have many of text fields, and i need switching between this text fields by using toolbar buttons

Design your toolbar however you prefer, then set it to the InputAccessoryView property of the UITextField whose keyboard it should accompany. It will be automatically displayed above the keyboard whenever it appears.

Related

OSX: Move keyboard focus between textfields and buttons using tab key

I am trying to toggle between textfields and buttons on my view using keyboard's tab button. The switching between textfields work but it does not switch between buttons. The view is shown as below.I did not find enough resources online to proceed further. Does anyone know how to resolve this?
There is nothing you can do with that issue.
It turns out that in the System Preferences > Keyboard > Shortcuts there is a checkbox, where you can change behaviour of the whole system:
To move keyboard focus only between text boxes and lists
To move keyboard between any of controls
And by default first checkbox is pressed.
As an addition. By default, NSWindow assigns an initial first responder and constructs a key view loop with the objects it finds. You can also change key view loop by calling this method: setNextKeyView.
For example,
[firstTextBox setNextKeyView:secondTextBox];
[secondTextBox setNextKeyView:secondButton];
[secondButton setNextKeyView:firstButton];
[firstButton setNextKeyView:firstTextBox];
This means that for users who expect moving control focus through all controls, this will work. And for those who have disabled this feature in settings, this won't work.
You can right-click on text field, drag "nextKeyView" and drop on another text field that you want to focus next when user press tab. Look like my picture below:
To add to #mjonka's answer, To move focus between controls is dependent on user's keyboard-shortcuts settings. What could be alternate solution is to just selecting your desired action button in your xib file and setting "Key Equivalent" value field to "enter" key in Attributes inspector as shown below. Same thing can be done for cancel button by setting "Key Equivalent" value to "Esc" key.

How to Add custom button to iPhone keyboard in iOS?

I want to add my customView on click of button which contain images similar to smiley(default button)while editing textField or textView using keyboard.
Thanks in advance.
You can't change default keyboard of Apple. But you can use inputAccessoryView of the text field, add a UIToolbar to it, and in the toolbar you can add a few buttons you want
or otherwise you create custom keyboard and then use it.

Next and Back tabs in UIKeyboard

using Xcode 4.3
I'm trying to toggle between text fields with a back and next tab in a UIKeyboardTypeDecimalPad keyboard. Can I add those to this type of keyboard? if so how?
You can override the entire keyboard (will need to make your own number buttons, etc.) with the inputView property on a text field.
Or, you can use the normal UIKit keyboard and add your own accessory view with your own buttons on top of the keyboard with the inputAccessoryView property.
See this example project: https://developer.apple.com/library/ios/#samplecode/KeyboardAccessory/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009462-Intro-DontLinkElementID_2

Can I edit the UINavigationItem's title from within the app?

So I want the ability to change the title of the UINavigationItem from within the app. To be more specific, I want to be able to tap the title on the navigation bar and have it go into edit mode; where I can type in a new title. Is there any way to do this?
It's quite possible and not very hard in fact. Here are the simple steps:
Navigation item allows for custom views in its title
Add a view with a label similar to that of the native navigation item
Add a transparent button (custom button) on top of the label
Add a hidden text field on top of the button
When the button is pressed, hide the label and show the text field - focus on the text field (becomeFirstResponder)
You are in editing mode: now track for "Return" key being pressed, and once that happens set your label text to what has been entered, resign first responder from the text field and hide it, then show the label
If you adjust all the properties of the UI components it will look like your navigation item supports inline editing!

ios search bar customize cancel button

Is it possible to change the text of this button or even use an icon?
In IB the button is not selectable and I can't find how to do it in the documentation.
Styling the cancel button in a UISearchBar