Giter Site home page Giter Site logo

taijizhu / yipopuptextview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inamiy/yipopuptextview

0.0 2.0 0.0 574 KB

facebook's post-like input text view for iOS (Beerware license)

Home Page: http://cocoacontrols.com/platforms/ios/controls/yipopuptextview

Objective-C 98.03% Ruby 1.97%

yipopuptextview's Introduction

YIPopupTextView

facebook's post-like input text view for iOS. (Supported iPad splitted-keyboard in ver 1.1.0)

iOS7

ScreenShot ScreenShot

iOS6

ScreenShot ScreenShot

Install via CocoaPods

pod 'YIPopupTextView'

How to use

// NOTE: maxCount = 0 to hide count
YIPopupTextView* popupTextView = [[YIPopupTextView alloc] initWithPlaceHolder:@"input here" maxCount:1000];
popupTextView.delegate = self;
popupTextView.caretShiftGestureEnabled = YES;   // default = NO
popupTextView.text = self.textView.text;
//popupTextView.editable = NO;                  // set editable=NO to show without keyboard

//[popupTextView showInView:self.view];
[popupTextView showInViewController:self]; // recommended, especially for iOS7

//
// NOTE:
// You can add your custom-button after calling -showInView:
// (it's better to add on either superview or superview.superview)
// https://github.com/inamiy/YIPopupTextView/issues/3
//
// [popupTextView.superview addSubview:customButton];
//

YIPopupTextViewButtonStyle

typedef NS_ENUM(NSInteger, YIPopupTextViewButtonStyle) {
    YIPopupTextViewButtonStyleNone,
    YIPopupTextViewButtonStyleRightCancel,          // "x" on the upper-right
    YIPopupTextViewButtonStyleRightDone,            // "check" on the upper-right
    YIPopupTextViewButtonStyleLeftCancelRightDone,
    YIPopupTextViewButtonStyleRightCancelAndDone,
    YIPopupTextViewButtonStyleLeftDone
};

For caret-shifting, it is better to use YISwipeShiftCaret for all UITextField/UITextViews.

License

YIPopupTextView is available under the Beerware license.

If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

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.