当前位置:网站首页>Short video system source code, click the blank space of the screen, the keyboard does not automatically stow
Short video system source code, click the blank space of the screen, the keyboard does not automatically stow
2022-07-04 22:18:00 【Cloudleopard network technology】
Short video system source code , Click on the blank space of the screen and the keyboard will not be automatically stowed
#import <UIKit/UIKit.h>
typedef void(^resignFirstResponderBlock)(BOOL hided);
@interface UITextField (hideKeyBoard)
// Delay logout of the first responder
-(BOOL)resignFirstResponder:(resignFirstResponderBlock)block;
@end
#import "UITextField+hideKeyBoard.h"
@implementation UITextField (hideKeyBoard)
/** * Delay logout of the first responder * * @param block Events executed after delay * * @return Judge */
-(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
The above is the source code of short video system , Click on the blank space of the screen and the keyboard will not be automatically stowed , More content welcome to follow the article
边栏推荐
- KDD2022 | 什么特征进行交互才是有效的?
- close系统调用分析-性能优化
- Cadre WebGIS - kalrry
- bizchart+slider实现分组柱状图
- PMO:比较25种分子优化方法的样本效率
- What is business intelligence (BI), just look at this article is enough
- odps 中 对表进行了一次备份,为什么在元数据库查m_table 时,两张表的逻辑大小不一致,但数
- ApacheCN 翻译、校对、笔记整理活动进度公告 2022.7
- Basic structure of PostgreSQL - table
- Common open source codeless testing tools
猜你喜欢

UML图记忆技巧

复数在数论、几何中的用途 - 曹则贤

赋能数字经济 福昕软件出席金砖国家可持续发展高层论坛
![[advanced C language] array & pointer & array written test questions](/img/3f/83801afba153cfc0dd73aa8187ef20.png)
[advanced C language] array & pointer & array written test questions

虚拟人产业面临的挑战

Bookmark

DevEco Device Tool 3.0 Release带来5大能力升级,让智能设备开发更高效

卷积神经网络模型之——LeNet网络结构与代码实现

HUAWEI nova 10系列发布 华为应用市场筑牢应用安全防火墙

Energy momentum: how to achieve carbon neutralization in the power industry?
随机推荐
B站大量虚拟主播被集体强制退款:收入蒸发,还倒欠B站;乔布斯被追授美国总统自由勋章;Grafana 9 发布|极客头条
Jvm-Sandbox-Repeater的部署
PostgreSQL服务端编程聚合和分组
Force buckle_ Palindrome number
力扣3_383. 赎金信
玩转gRPC—深入概念与原理
ApacheCN 翻译、校对、笔记整理活动进度公告 2022.7
Relational database
1807. 替换字符串中的括号内容
Service online governance
《命令行上的数据科学第二版》校对活动重新启动
Ascendex launched Walken (WLKN) - an excellent and leading "walk to earn" game
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
虚拟人产业面临的挑战
网上开户哪家证券公司佣金最低,我要开户,网上开户安全吗
删库不必跑路!详解 MySQL 数据恢复
VS2019 C# release下断点调试
力扣_回文数
Interview question 01.08 Zero matrix
idea中pom.xml依赖无法导入