当前位置:网站首页>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
边栏推荐
- i.MX6ULL驱动开发 | 24 - 基于platform平台驱动模型点亮LED
- close系统调用分析-性能优化
- The drawing method of side-by-side diagram, multi row and multi column
- Bookmark
- 面试题 01.01. 判定字符是否唯一
- TLA+ 入门教程(1):形式化方法简介
- 大厂的广告系统升级,怎能少了大模型的身影
- Nat. Commun.| Machine learning jointly optimizes the affinity and specificity of mutagenic therapeutic antibodies
- You don't have to run away to delete the library! Detailed MySQL data recovery
- Acwing 2022 daily question
猜你喜欢
![[advanced C language] array & pointer & array written test questions](/img/3f/83801afba153cfc0dd73aa8187ef20.png)
[advanced C language] array & pointer & array written test questions

É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)

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

湘江鲲鹏加入昇腾万里伙伴计划,与华为续写合作新篇章

BigFilter全局交易防重组件的介绍与应用

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

迷失在Mysql的锁世界

TCP协议三次握手过程

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

【Acwing】第58场周赛 题解
随机推荐
ACM multimedia 2022 | counterfactual measurement and elimination of social prejudice in visual language pre training model
MySQL storage data encryption
能源势动:电力行业的碳中和该如何实现?
服务线上治理
HDU - 1078 fatmouse and cheese (memory search DP)
What is business intelligence (BI), just look at this article is enough
如何实现轻松管理1500万员工?
# 2156. Find the substring of the given hash value - post order traversal
Jvm-Sandbox-Repeater的部署
HDU - 1078 FatMouse and Cheese(记忆化搜索DP)
El tree combined with El table, tree adding and modifying operations
将QA引入软件开发生命周期是工程师要遵循的最佳实践
Sorting and sharing of selected papers, systems and applications related to the most comprehensive mixed expert (MOE) model in history
Machine learning notes mutual information
做BI开发,为什么一定要熟悉行业和企业业务?
Cadre WebGIS - kalrry
Is it safe to open an account in the stock of Caicai college? Can you only open an account by digging money?
Xiangjiang Kunpeng joined the shengteng Wanli partnership program and continued to write a new chapter of cooperation with Huawei
文件读取写入
传智教育|如何转行互联网高薪岗位之一的软件测试?(附软件测试学习路线图)