Proxy design mode:
1. Use Cases-"a wants B to help with some things, so B becomes a proxy for A." a wants to notify B that something has happened, or, if you want to pass some data to B, you can make B a proxy for, let B be the proxy of A 2. Use step-define an agreement-"B must abide by the agreement and implement the corresponding method-" a should define a proxy attribute, ID <protocol> delegate-> creates the B object and sets the delegate attribute of a to the simple processing of the keyboard of the B object:
Textfield: keyborad type attribute Default and name phone pad numbers and punctuation URL Number pad phone Pade-mail address decimal pad Twitter web search
Textfield: Clear button: whether to display the Clear button Appears while editing: When editing, is always visible: always appears. The two effects are the same. Never appears: never appears (default) appears unless Editing: exit the keyboard when the text box loses focus :/*
Responder: the object that can process the event
First responder: the text box control that calls the keyboard
How to exit the keyboard: a text box control does not want to be the first responder
*/
[_ Phonefield resignfirstresponder];
// All text boxes in self. View exit the keyboard. If there is a view control and textfield in the View control, the keyboard is also exited.
[Self. View endediting: Yes];
Add a toolbar to the top of the keyboard
// Load the toolbar on the keyboard only once, so it is written in the viewdidload method.
// 1. Load XIB to create a toolbar
Uitoolbar * keyboardtool = [[nsbundle mainbundle] loadnibnamed: @ "keyboradtool" Owner: Nil options: Nil];
// Set the toolbar at the top of the text box
_ Phonefield. inputaccessoryview = keyboardtool;
// The text box becomes the first responder
[_ Phonefield becomefirstresponder];
// Custom keyboard
_ Phonefield. inputview =;
Advanced 11_proxy design mode_simple keyboard processing