当前位置:网站首页>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
边栏推荐
- 【愚公系列】2022年7月 Go教学课程 003-IDE的安装和基本使用
- 置信区间的画法
- 传智教育|如何转行互联网高薪岗位之一的软件测试?(附软件测试学习路线图)
- 机器人相关课程考核材料归档实施细则2022版本
- TCP协议三次握手过程
- The drawing method of side-by-side diagram, multi row and multi column
- 什么是商业智能(BI),就看这篇文章足够了
- 力扣3_383. 赎金信
- É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)
- 《命令行上的数据科学第二版》校对活动重新启动
猜你喜欢

Play with grpc - go deep into concepts and principles

QT - plot other problems

机器学习笔记 - 互信息Mutual Information

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

PMO:比较25种分子优化方法的样本效率

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

Energy momentum: how to achieve carbon neutralization in the power industry?

i.MX6ULL驱动开发 | 24 - 基于platform平台驱动模型点亮LED

i. Mx6ull driver development | 24 - platform based driver model lights LED

可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
随机推荐
力扣_回文数
股票开户流程是什么?使用同花顺手机炒股软件安全吗?
智洋创新与华为签署合作协议,共同推进昇腾AI产业持续发展
KDD2022 | 什么特征进行交互才是有效的?
PostgreSQL服务端编程聚合和分组
Concurrent optimization summary
Apachecn translation, proofreading, note sorting activity progress announcement 2022.7
Common shortcut keys for hbuilder x
Interview question 01.01 Determine whether the character is unique
Representation of confidence interval
凭借了这份 pdf,最终拿到了阿里,字节,百度等八家大厂 offer
从RepVgg到MobileOne,含mobileone的代码
将QA引入软件开发生命周期是工程师要遵循的最佳实践
30余家机构联合发起数字藏品行业倡议,未来会如何前进?
BigFilter全局交易防重组件的介绍与应用
The proofreading activity of data science on the command line second edition was restarted
Concurrent network modular reading notes transfer
Solana链上应用Crema因黑客攻击停运
Kdd2022 | what features are effective for interaction?
好用app推荐:扫描二维码、扫描条形码并查看历史