Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inamiy/YIPopupTextView
facebook's post-like input text view for iOS (Beerware license)
https://github.com/inamiy/YIPopupTextView
Last synced: 8 days ago
JSON representation
facebook's post-like input text view for iOS (Beerware license)
- Host: GitHub
- URL: https://github.com/inamiy/YIPopupTextView
- Owner: inamiy
- Created: 2012-02-01T12:11:53.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2016-09-20T11:44:29.000Z (about 8 years ago)
- Last Synced: 2024-10-31T07:04:31.443Z (13 days ago)
- Language: Objective-C
- Homepage: http://cocoacontrols.com/platforms/ios/controls/yipopuptextview
- Size: 600 KB
- Stars: 246
- Watchers: 16
- Forks: 61
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - YIPopupTextView - facebook's post-like input text view for iOS (Beerware license) (etc)
- awesome - YIPopupTextView - facebook's post-like input text view for iOS (Beerware license) (etc)
README
YIPopupTextView
===============facebook's post-like input text view for iOS.
(Supported iPad splitted-keyboard in ver 1.1.0)### iOS7
### iOS6
Install via [CocoaPods](http://cocoapods.org/)
----------```
pod 'YIPopupTextView'
```How to use
----------
```objc
// 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
```objc
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](https://github.com/inamiy/YISwipeShiftCaret) for all UITextField/UITextViews.
License
-------
`YIPopupTextView` is available under the [Beerware](http://en.wikipedia.org/wiki/Beerware) license.If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.