iOS 键盘视图 CLInputAccessoryView

码农软件 · 软件分类 · 键盘(Keyboard) · 2019-07-15 07:59:17

软件介绍

CLInputAccessoryView 是点击输入框后,为弹出键盘添加上方的工具条。

image

使用方法:

#import "CLInputAccessoryView.h"
  // 初始化键盘上方工具栏
_inputAccessoryView = [[CLInputAccessoryView alloc] init];
[_inputAccessoryView addControlledTextView:_textField];
[_inputAccessoryView addControlledTextView:_textView];
_inputAccessoryView.leftButtonColor = [[UIColor grayColor] colorWithAlphaComponent:0.5];
// 如果点击按钮后只隐藏键盘,则不用添加委托,否则添加协议和委托
为使用类添加协议 <CLInputAccessoryViewDelegete>
_inputAccessoryView.delegate = self;
/** 点击左侧按钮后调用此方法,返回YES则隐藏键盘,NO则不隐藏键盘 */
- (BOOL)leftButtonDidClick:(id)textView
{
    NSString *text = [textView text];
    [textView setText:[text stringByAppendingString:@"取消 "]];
    return YES;
}
/** 点击右侧按钮后触发此方法 */
- (BOOL)rightButtonDidClick:(id)textView
{
    NSString *text = [textView text];
    [textView setText:[text stringByAppendingString:@"完成 "]];
    return NO;
}

本文地址:https://codercto.com/soft/d/10164.html

An Introduction to Genetic Algorithms

An Introduction to Genetic Algorithms

Melanie Mitchell / MIT Press / 1998-2-6 / USD 45.00

Genetic algorithms have been used in science and engineering as adaptive algorithms for solving practical problems and as computational models of natural evolutionary systems. This brief, accessible i......一起来看看 《An Introduction to Genetic Algorithms》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试