博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
UIResponder的API
阅读量:4594 次
发布时间:2019-06-09

本文共 3182 字,大约阅读时间需要 10 分钟。

@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;

更新给定用户活动的状态。

转载于:https://www.cnblogs.com/cchHers/p/11244802.html

你可能感兴趣的文章
unshift()与shift()
查看>>
使用 NPOI 、aspose实现execl模板公式计算
查看>>
行为型模式:中介者模式
查看>>
How to Notify Command to evaluate in mvvmlight
查看>>
33. Search in Rotated Sorted Array
查看>>
461. Hamming Distance
查看>>
Python垃圾回收机制详解
查看>>
{面试题1: 赋值运算符函数}
查看>>
Node中没搞明白require和import,你会被坑的很惨
查看>>
Python 标识符
查看>>
Python mysql 创建连接
查看>>
企业化的性能测试简述---如何设计性能测试方案
查看>>
centos7 安装中文编码
查看>>
POJ - 3683 Priest John's Busiest Day
查看>>
正则表达式start(),end(),group()方法
查看>>
vuejs 学习旅程一
查看>>
javascript Date
查看>>
linux常用命令2
查看>>
狼图腾
查看>>
13、对象与类
查看>>