YISwipeShiftCaretios交互控件
适用于iOS的滑动到移动文本输入插入符号(无私有API)
示例代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // add swipe-shift-caret gestures to all of UITextField/UITextView [YISwipeShiftCaret install]; // // or, you can implement gestures manually as follows, adding to non-textInput (wider parent) view: // // YISwipeShiftCaretGestureRecognizer* gesture = [[YISwipeShiftCaretGestureRecognizer alloc] initWithTextInput:self.textField]; // [self.window addGestureRecognizer:gesture]; return YES; }
评论