Giter Site home page Giter Site logo

sbtextinputview's Introduction

SBTextInputView

CI Status Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

To install SBTextInputView, simply add the following line to your Podfile:

pod "SBTextInputView", :git => 'https://github.com/schrockblock/SBTextInputView'

Usage

There are a couple options for using this view:

  1. Include it right in your xib/storyboard
  2. Use the specialized init method

The first option is pretty self explanatory. For the second, just do something like:

[[SBTextInputView alloc] initWithFrame:CGRectMake(x, y, width, height) superView:self.view delegate:self];

(You can check out the Example folder for more.)

Then, when you want to show the keyboard, just call becomeFirstResponder on the instance. To hide it, resignFirstResponder.

If you'd like to make this an inputAccessoryView of something else, just pass in nil for the superView param in the constructor, and treat it like any other view.

All the subviews are exposed properties, so you can style them any way you'd like. The background is a lightweight subclass of UIToolbar which overrides some of its more annoying behavior.

You might also like to edit the text programmatically (perhaps reseting the text to @"") and have the view size appropriately. To do this, just set the inputTextView.text as desired, then call notifyTextChanged on the SBTextInputView.

Author

Elliot Schrock

License

SBTextInputView is available under the MIT license. See the LICENSE file for more info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.