Thursday, 27 September 2012

How to Custom UIKeyBoard for UITextField


                          Custom UIKeyboard 


   UITextField contains two properties

   
       // set while first responder, will not take effect until reloadInputViews is called.
@property (readwrite, retain) UIView *inputView;             
@property (readwrite, retain) UIView *inputAccessoryView;


inputView


Can use our custom UIView instead of system keyboard by using inputView property, create your own  UIView and assign to the inputView property.
  
              yourtxtfield.inputView = yourCustomKeyboardUIView;  
      
can switch our custom keyboard and  system keyboard by using  reloadInputViews (Updates the custom input and accessory views when the object is the first responder)

  change custom keyboard to system keyboard

            yourtxtfield.inputView = nil;
            [yourtxtfield  reloadInputViews];

 change system keyboard to custom keyboard
    
            youttxtfield.inputView = yourCustomKeyboardUIView;
            [self.kbtxtfield reloadInputViews];

       
replaced system keyboard by our custom UIView

inputAccessoryView

Can add a toolbar like view on top of system keyboard by using inputAccessoryView property, create your own UIView and assign to the property.

              yourtxtfield.inputAccessoryView = yourCustomtoolbarlikeUIView;
       
added toolbar like view on top of system keyboard using inputAccessoryView




This sample describes how to add a toolbar(input AccessoryView) on top of system keyboard and how to add a custom keyboard by replacing system UIKeyboard. you can also switch between custom view and system keyboard ,this sample used xib for custom keyboardview and inputAccessoryView, also describes that how to use Custom UIView and  XIB UIView.


download source code : https://github.com/karthikprabhuA/CustomKeyboardInputView-Sample
   

22 comments:


  1. nice blogs.
    Friend chatMake new friend’s without revealing yourself. Dial 543216 at Rs 2/min and monthly subscription of Rs 30/ 30 days.

    ReplyDelete
  2. I’m really amazed with your posting skills as well as with the layout on your blog site. Is this a

    paid style or did you modify it yourself? Either way keep up the pleasant quality writing, it is

    rare to see a great site such as this one these days.
    ios application development

    ReplyDelete
  3. Thanks for sharing this useful info. Keep updating same way.IOS Applications Development in Bangalore.

    ReplyDelete
  4. Hi, I read your blog this is very informative. Thanks for share this blog. You can find dedicated Web designers, Mobile Application Developers, SEO and marketing specialists will tailor make the solution you want for your business. Know more about click here – www.hvantagetechnologies.com

    ReplyDelete
  5. Thanks for the post. You have explained the topic in very simple and step by step. At Yberry Infosystem a Mobile application development company, we have taken up this challenge of delivering the app that is ideal matched for you. Visit: www.yberryinfosystem.com

    ReplyDelete
  6. Great Work. This post is worth everyone’s attention. web design company in chennai

    ReplyDelete


  7. Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..
    please sharing like this information......
    Android training in chennai
    Ios training in chennai

    ReplyDelete
  8. Being new to the blogging world I feel like there is still so much to learn. Your tips helped to clarify a few things for me as well as giving..
    Mobile App Development Company
    Mobile App Development Company
    Mobile app Development Companies

    ReplyDelete
  9. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    IOS Training in Chennai

    ReplyDelete
  10. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    Android App Development Company

    ReplyDelete
  11. Nice blog..! I really loved reading through this article... Thanks for sharing such an amazing post with us and keep blogging...
    ios app development course

    ReplyDelete
  12. Nice it seems to be good post... It will get readers engagement on the article since readers engagement plays an vital role in every blog.i am expecting more updated posts from your hands.
    iOS App Development Company
    iOS App Development Company

    ReplyDelete
  13. This article is very much helpful and i hope this will be an useful information for the needed one. Keep on updating these kinds of informative things...
    Fitness SMS
    Fitness Text
    Salon SMS
    Salon Text
    Investor Relation SMS
    Investor Relation Text
    Mobile Marketing Services
    mobile marketing companies
    Sms API

    ReplyDelete
  14. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

    ReplyDelete