当前位置:网站首页>短视频系统源码,点击屏幕空白处键盘不自动收起
短视频系统源码,点击屏幕空白处键盘不自动收起
2022-07-04 21:48:00 【云豹网络科技】
短视频系统源码,点击屏幕空白处键盘不自动收起
#import <UIKit/UIKit.h>
typedef void(^resignFirstResponderBlock)(BOOL hided);
@interface UITextField (hideKeyBoard)
//延时注销第一响应者
-(BOOL)resignFirstResponder:(resignFirstResponderBlock)block;
@end
#import "UITextField+hideKeyBoard.h"
@implementation UITextField (hideKeyBoard)
/** * 延时注销第一响应者 * * @param block 延时后执行的事件 * * @return 判断 */
-(BOOL)resignFirstResponder:(resignFirstResponderBlock)block{
dispatch_async(dispatch_get_global_queue(0, 0), ^{
double delayInSeconds = 0.1;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^{
[self resignFirstResponder];
block(YES);
});
});
return YES;
}
@end
以上就是短视频系统源码,点击屏幕空白处键盘不自动收起, 更多内容欢迎关注之后的文章
边栏推荐
猜你喜欢

赋能数字经济 福昕软件出席金砖国家可持续发展高层论坛

El tree combined with El table, tree adding and modifying operations

做BI开发,为什么一定要熟悉行业和企业业务?

并发网络模块化 读书笔记转

Huawei Nova 10 series released Huawei application market to build a solid application security firewall

常用的开源无代码测试工具

The use of complex numbers in number theory and geometry - Cao Zexian

玩转gRPC—深入概念与原理

Scala下载和配置

Éducation à la transmission du savoir | Comment passer à un test logiciel pour l'un des postes les mieux rémunérés sur Internet? (joindre la Feuille de route pour l'apprentissage des tests logiciels)
随机推荐
保证接口数据安全的10种方案
现在mysql cdc2.1版本在解析值为0000-00-00 00:00:00的datetime类
Cadeus has never stopped innovating. Decentralized edge rendering technology makes the metauniverse no longer far away
可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
Nat. Commun.| 机器学习对可突变的治疗性抗体的亲和力和特异性进行共同优化
从RepVgg到MobileOne,含mobileone的代码
PostgreSQL JOIN实践及原理
# 2156. 查找给定哈希值的子串-后序遍历
Which securities company has the lowest Commission for opening an account online? I want to open an account. Is it safe to open an account online
File read write
开户哪家券商比较好?网上开户安全吗
WebGIS framework -- kalrry
[advanced C language] array & pointer & array written test questions
迷失在Mysql的锁世界
2022 version of stronger jsonpath compatibility and performance test (snack3, fastjson2, jayway.jsonpath)
Solve the problem of data disorder caused by slow asynchronous interface
【C语言进阶篇】数组&&指针&&数组笔试题
Flink1.13 SQL basic syntax (I) DDL, DML
解决异步接口慢导致的数据错乱问题
Play with grpc - go deep into concepts and principles