Object-c
// Hide the keyboard with a touch screen
Did end on exit calls the following events. When you click return on the keyboard, the keyboard is hidden.
-(Ibaction) textfieldshouldreturn :( uitextfield *) textfield {
// [Sender resignfirstresponder];
If (textfield = Chi ){
[CHI resignfirstresponder];
Double M = [CHI. textdoublevalue]/3.003;
Double F = m * 3.2808;
Meter. Text = [[nsstringalloc] initwithformat: @ "%. 4f", m];
Feet. Text = [[nsstringalloc] initwithformat: @ "%. 4f", F];
}
If (textfield = meter ){
[Meter resignfirstresponder];
}
If (textfield = feet ){
[Feet resignfirstresponder];
}
}
Hide the keyboard when you click on the screen
-(Void) touchesbegan :( nsset *) touches withevent :( uievent *) event {
Uitouch * Touch = [[event alltouches] anyobject];
If (touch. tapcount> = 1 ){
[CHI resignfirstresponder];
[Meter resignfirstresponder];
[Feet resignfirstresponder];
}
}