UIResponder的API
@property(nonatomic, readonly) UIResponder *nextResponder;
返回响应者链中的下一个响应者,或者nil如果没有下一个响应者。
@property(nonatomic, readonly) BOOL isFirstResponder;
返回一个布尔值,指示此对象是否是第一个响应者。
@property(nonatomic, readonly) BOOL canBecomeFirstResponder;
返回一个布尔值,指示此对象是否可以成为第一个响应者。
- (BOOL)becomeFirstResponder;
要求UIKit将此对象作为其窗口中的第一个响应者。
@property(nonatomic, readonly) BOOL canResignFirstResponder;
返回一个布尔值,指示接收者是否愿意放弃第一响应者状态。
- (BOOL)resignFirstResponder;
通知此对象已要求它在其窗口中放弃其作为第一响应者的状态。
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
告诉此对象在视图或窗口中发生了一个或多个新触摸。
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
当与事件关联的一个或多个触摸发生更改时,告知响应者。
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
当从视图或窗口抬起一个或多个手指时告诉响应者。
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
当系统事件(例如系统警报)取消触摸序列时,告诉响应者。
- (void)touchesEstimatedPropertiesUpdated:(NSSet<UITouch *> *)touches;
告知响应者已收到先前估计的属性的更新值或不再期望更新。
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event;
告诉接收者运动事件已经开始。
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event;
告诉接收者动作事件已经结束。
- (void)motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event;
告知接收者已取消动作事件。
- (void)pressesBegan:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event;
首次按下物理按钮时告诉此对象。
- (void)pressesChanged:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event;
当与印刷机关联的值发生变化时,告诉此对象。
- (void)pressesEnded:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event;
释放按钮时告诉对象。
- (void)pressesCancelled:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event;
当系统事件(例如低内存警告)取消按下事件时,告诉此对象。
- (void)remoteControlReceivedWithEvent:(UIEvent *)event;
收到远程控制事件时告诉对象。
@property(nonatomic, readonly, strong) __kindof UIView *inputView;
当接收者成为第一个响应者时显示的自定义输入视图。
@property(nonatomic, readonly, strong) UIInputViewController *inputViewController;
自定义输入视图控制器在接收器成为第一响应者时使用。
@property(nonatomic, readonly, strong) __kindof UIView *inputAccessoryView;
当接收器成为第一响应者时显示的自定义输入附件视图。
@property(nonatomic, readonly, strong) UIInputViewController *inputAccessoryViewController;
自定义输入附件视图控制器,当接收器成为第一响应者时显示。
- (void)reloadInputViews;
当对象是第一响应者时更新自定义输入和附件视图。
@property(nonatomic, readonly) NSUndoManager *undoManager;
返回响应程序链中最近的共享撤消管理器。
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender;
请求接收响应者在用户界面中启用或禁用指定的命令。
- (id)targetForAction:(SEL)action withSender:(id)sender;
返回响应操作的目标对象。
@property(nonatomic, readonly) NSArray<UIKeyCommand *> *keyCommands;
触发此响应程序操作的关键命令。
@property(nonatomic, readonly, strong) UITextInputMode *textInputMode;
此响应程序对象的文本输入模式。
@property(nonatomic, readonly, strong) NSString *textInputContextIdentifier;
一个标识符,表示响应者应保留其文本输入模式信息。
+ (void)clearTextInputContextIdentifier:(NSString *)identifier;
从应用程序的用户默认值中清除文本输入模式信息。
@property(nonatomic, readonly, strong) UITextInputAssistantItem *inputAssistantItem;
配置键盘快捷键栏时使用的输入助手。
@property(nonatomic, strong) NSUserActivity *userActivity;
封装此响应程序支持的用户活动的对象。
- (void)restoreUserActivityState:(NSUserActivity *)activity;
恢复继续给定用户活动所需的状态。
- (void)updateUserActivityState:(NSUserActivity *)activity;
更新给定用户活动的状态。
UIResponder的API的更多相关文章
- iOS开发UIResponder简介API
#import <Foundation/Foundation.h> #import <UIKit/UIKitDefines.h> #import <UIKit/UIEve ...
- iOS中文API之UIResponder介绍
该UIResponder类定义了响应和处理事件的对象接口.它是UIView和UIApplication的超类(UIWindow).这些类的实例有时被称为响应者对象,简单地说就是响应者. 通常有2种事件 ...
- IOS7学习之路十(百度地图API环境搭建)
百度地图官网的API开发教程链接:点击打开链接 我按照他的教程做的总出现"Apple Mach-O linker command failed with exit code 1"的 ...
- iOS - UIEvent事件及UIResponder响应者
在iOS中不是所有的对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事件,称之为响应者对象: UIApplication.UIViewController.UIView都继承自U ...
- UIViewController所有API的学习。
<欢迎大家加入iOS开发学习交流群:QQ529560119> /* UIViewController is a generic controller base class tha ...
- iOS开发UIResponder之NSUndoManager
1.简介 UIResponder有个属性:NSUndoManager @property(nullable, nonatomic,readonly) NSUndoManager *undoManage ...
- 干货来袭-整套完整安全的API接口解决方案
在各种手机APP泛滥的现在,背后都有同样泛滥的API接口在支撑,其中鱼龙混杂,直接裸奔的WEB API大量存在,安全性令人堪优 在以前WEB API概念没有很普及的时候,都采用自已定义的接口和结构,对 ...
- 12306官方火车票Api接口
2017,现在已进入春运期间,真的是一票难求,深有体会.各种购票抢票软件应运而生,也有购买加速包提高抢票几率,可以理解为变相的黄牛.对于技术人员,虽然写一个抢票软件还是比较难的,但是还是简单看看123 ...
- 几个有趣的WEB设备API(二)
浏览器和设备之间还有很多有趣的接口, 1.屏幕朝向接口 浏览器有两种方法来监听屏幕朝向,看是横屏还是竖屏. (1)使用css媒体查询的方法 /* 竖屏 */ @media screen and (or ...
随机推荐
- AcWing 8.二维费用的背包问题
#include<iostream> #include<algorithm> #include<cstring> using namespace std ; ; i ...
- PHP Apache/Nginx/IIS等各环境下的伪静态配置
一.Apache的伪静态配置 1.网站根目录下需要有 .htaccess 文件,没有则自己创建一个,内容如下: <IfModule mod_rewrite.c> RewriteEngine ...
- MarkDown的黄金搭档Typora编辑器
让你成为热爱写作的程序员 学习编程的小伙伴,要养成记笔记的好习惯,并发布到博客上去与同行分享你的学习经验,那么传统的文本编辑器或多或少会不尽人意,效率低,而且码字体验与写代码完全不一样. 下面推荐一款 ...
- Flink流处理(五)- 状态与一致性模型
状态(State)与一致性模型 接下来我们转向另一个在流处理中十分重要的点:状态(state).状态在数据处理中是无处不在的.为了产生一个结果,函数一般会聚合某个时间段内(或是一定数量的)events ...
- HTML学习(5)标题、水平线、注释
HTML 标题 标题(Heading)是通过 <h1> - <h6> 标签进行定义的. <h1> 定义最大的标题. <h6> 定义最小的标题. 注: 浏 ...
- FFmpeg—— Bitstream Filters 作用
原文链接: https://stackoverflow.com/questions/32028437/what-are-bitstream-filters-in-ffmpeg Let me expla ...
- 210. 课程表 II
Q: 现在你总共有 n 门课需要选,记为 0 到 n-1. 在选修某些课程之前需要一些先修课程. 例如,想要学习课程 0 ,你需要先完成课程 1 ,我们用一个匹配来表示他们: [0,1] 给定课程总量 ...
- rabbitmq 命令行与控制台
命令行和管控台 rabbitmqctl stop_app 关闭应用 rabbitmqctl start_app 打开应用 rabbitmqctl status 节点状态 rabbitmqctl add ...
- Codeforces 1315B Homecoming (二分)
After a long party Petya decided to return home, but he turned out to be at the opposite end of the ...
- python map、join函数
map() 会根据提供的函数对指定序列做映射. 第一个参数 function 以参数序列中的每一个元素调用 function 函数,返回包含每次 function 函数返回值的新列表. map(fun ...