illyabusigin/CYRKeyboardButton

语言: Objective-C

git: https://github.com/illyabusigin/CYRKeyboardButton

一个插入式键盘按钮,模仿原生iOS键盘按钮的外观,感觉和功能
A drop-in keyboard button that mimics the look, feel, and functionality of the native iOS keyboard buttons
README.md (中文)

CYRKeyboardButton

Version
License
Platform

作者:Illya Busigin

  • 访问我的博客http://illyabusigin.com/
  • 在Twitter上关注@illyabusigin

目的

CYRKeyboardButton是一个嵌入式键盘按钮,模仿原生iOS键盘按钮的外观,感觉和功能。在为iOS构建QED Solver时,我需要复制本机键盘按钮的外观。 CYRKeyboardButton旨在成为那些希望复制标准键盘功能的人的最终键盘按钮控件。功能包括: - 可靠的简单配置 - UIAppearance协议支持 - 扩展输入选项支持 - 强大的文档

截图

要求

适用于iPhone,iPad和iPod touch的iOS 7.0或更高版本(带ARC)

安装

要使用CYRKeyboardButton,只需将类文件拖到项目中。您可以以编程方式创建CYRKeyboardButton实例,或者通过将普通的UIView拖入视图并将其类设置为CYRKeyboardButton来在Interface Builder中创建它们。

如果您使用Interface Builder,要设置CYRKeyboardButton的自定义属性(常规UIViews不支持的属性),请为您的视图创建IBOutlet并在代码中设置属性,或使用Interface Builder中的用户定义的运行时属性功能(在Xcode 4.2中为iOS 5+引入)。

用法

CYRKeyboardButton *keyboardButton = [CYRKeyboardButton new];
keyboardButton.translatesAutoresizingMaskIntoConstraints = NO;
keyboardButton.input = @"A";
keyboardButton.inputOptions = @[@"A", @"B", @"C", @"D"];
keyboardButton.textInput = self.textView;
[self.view addSubview:keyboardButton];

CYRKeyboardButton包含一个iPhone示例项目,演示如何在输入附件视图中使用CYRKeyboardButtons,并具有漂亮的自动布局大小/间距。

错误和功能请求

此组件不提供任何支持。如果您想要一个功能或发现错误,请通过GitHub问题跟踪器提交功能请求。

欢迎提出错误修复和功能的拉取请求!

归因

CYRKeyboardButton使用以下来源的部分代码。

Component Description License
TurtleBezierPath UIBezierPath subclass for Turtle Graphics WITH

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

CYRKeyboardButton

Version
License
Platform

by Illya Busigin

Purpose

CYRKeyboardButton is a drop-in keyboard button that mimics the look, feel, and functionality of the native iOS keyboard buttons. When building QED Solver for iOS I needed to replicate the look and feel of the native keyboard buttons. CYRKeyboardButton aims to be the definitive keyboard button control for those looking to replicate the standard keyboard functionality. Features include:
- Ridiculously simple configuration
- UIAppearance protocol support
- Extended input options support
- Robust documentation

Screenshot

Requirements

iOS 7.0 or later (with ARC) for iPhone, iPad and iPod touch

Installation

To use CYRKeyboardButton, just drag the class files into your project.. You can create CYRKeyboardButton instances programatically, or create them in Interface Builder by dragging an ordinary UIView into your view and setting its class to CYRKeyboardButton.

If you are using Interface Builder, to set the custom properties of CYRKeyboardButton (ones that are not supported by regular UIViews) either create an IBOutlet for your view and set the properties in code, or use the User Defined Runtime Attributes feature in Interface Builder (introduced in Xcode 4.2 for iOS 5+).

Usage

CYRKeyboardButton *keyboardButton = [CYRKeyboardButton new];
keyboardButton.translatesAutoresizingMaskIntoConstraints = NO;
keyboardButton.input = @"A";
keyboardButton.inputOptions = @[@"A", @"B", @"C", @"D"];
keyboardButton.textInput = self.textView;
[self.view addSubview:keyboardButton];

Example

CYRKeyboardButton includes an iPhone example project that demonstrates how to use CYRKeyboardButtons in an input accessory view with nifty autolayout sizing/spacing.

Bugs & Feature Requests

There is no support offered with this component. If you would like a feature or find a bug, please submit a feature request through the GitHub issue tracker.

Pull-requests for bug-fixes and features are welcome!

Attribution

CYRKeyboardButton uses portions of code from the following sources.

Component Description License
TurtleBezierPath UIBezierPath subclass for Turtle Graphics MIT