4

How do you make a keyboard have a textfield inside like the messages app ?

swiftBoy
  • 35,607
  • 26
  • 136
  • 135
rounak
  • 9,217
  • 3
  • 42
  • 59

2 Answers2

2

never tried but you can try this -

You can programmatically

  1. set a tool bar.
  2. set a textfield.
  3. set the tool bar as the inputAccessoryView of the textfield.
  4. make the textfield the first responder.
shannoga
  • 19,649
  • 20
  • 104
  • 169
1

It depends what you're trying to do with it. You could simply create a view that looks like the keyboard section and show it right above the keyboard. If you're trying to actually send SMSs/emails, look up the MessageUI documentation.

Aurum Aquila
  • 9,126
  • 4
  • 25
  • 24
  • I realised that later that the MessageUI is meant for actually sending SMS and mails. What I wanted was to have a keyboard similar to the ones in apps like Meebo, Messages, IM apps, thats it no sending actual messages – rounak Jan 25 '11 at 12:09
  • Which is why I mentioned floating a UIView on top of your views that appears right above the keyboard. It doesn't have to be part of the keyboard. You could also message one of those apps devs - us devs have to work together, one of them might share their secret. – Aurum Aquila Jan 25 '11 at 12:11