Giter Club home page Giter Club logo

rkdropdowntextfield's Introduction

RKDropDownTextField

CI Status Version License Platform

enter image description here

Example

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

Intro

RKDropDownTextField is a quick to install easy to use dropdown textField for iOS.

How to use

  1. Drag and drop a UIView into storyboard.
  2. Change its class to RKDropDownTextField.

enter image description here

  1. Set necessary attributes in the attributes inspector.

enter image description here

  1. Create outlet.

  2. Set delegate as the object which conforms to the protocol <RKDropDownTextFieldDelegate>.

  3. Populate values array with the possible dropdown values. enter image description here

  4. Implement delegate method

     - (void)dropDownTextField:(RKDropDownTextField *)dropDownTextField
       didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     // Your code goes here
     }
    
  5. Set the property values with the possible values the list must contain.

You are done! Run the code and try tapping on the DropDownTextField.

Requirements

iOS 8.0. Objective C.

Installation

RKDropDownTextField is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "RKDropDownTextField"

Author

Radhakrishna Pai, [email protected]

License

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

rkdropdowntextfield's People

Contributors

radhakrishnapai avatar

Stargazers

 avatar Carabineiro avatar

Watchers

Carabineiro avatar  avatar  avatar

Forkers

carabina

rkdropdowntextfield's Issues

Inheritance issue

What do you think about changing part:

  • (UIView *)viewFromNibForClass {
    NSBundle *bundle = [NSBundle bundleForClass:[self class]];
    UINib *nib = [UINib nibWithNibName:@"RKDropDownTextField" bundle:bundle];
    UIView *view = (UIView *)[nib instantiateWithOwner:self options:nil].firstObject;
    return view;
    }

To:

  • (UIView *)viewFromNibForClass {
    NSBundle *bundle = [NSBundle bundleForClass:[RKDropDownTextField class]];
    UINib *nib = [UINib nibWithNibName:@"RKDropDownTextField" bundle:bundle];
    UIView *view = (UIView *)[nib instantiateWithOwner:self options:nil].firstObject;
    return view;
    }

When I inheritance from RKDropDownTextField and try to use my custom class I get exception of non existing nib in my bundle, because this method uses "self" and after that it points to wrong bundle.

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.