当前位置:网站首页>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
边栏推荐
猜你喜欢
常用的开源无代码测试工具
With this PDF, we finally got offers from eight major manufacturers, including Alibaba, bytek and Baidu
【Acwing】第58场周赛 题解
保证接口数据安全的10种方案
凭借了这份 pdf,最终拿到了阿里,字节,百度等八家大厂 offer
Scala download and configuration
【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】
PMO:比较25种分子优化方法的样本效率
Enabling digital economy Fuxin software attends the BRICs high level Forum on Sustainable Development
Deveco device tool 3.0 release brings five capability upgrades to make intelligent device development more efficient
随机推荐
好用app推荐:扫描二维码、扫描条形码并查看历史
i.MX6ULL驱动开发 | 24 - 基于platform平台驱动模型点亮LED
The proofreading activity of data science on the command line second edition was restarted
将QA引入软件开发生命周期是工程师要遵循的最佳实践
能源势动:电力行业的碳中和该如何实现?
大厂的广告系统升级,怎能少了大模型的身影
VIM from dislike to dependence (23) -- the last gossip
ACM multimedia 2022 | counterfactual measurement and elimination of social prejudice in visual language pre training model
[advanced C language] array & pointer & array written test questions
Tiktok actual combat ~ the number of comments is updated synchronously
el-tree结合el-table,树形添加修改操作
Acwing 2022 daily question
MongoDB中的索引操作总结
股票开户流程是什么?使用同花顺手机炒股软件安全吗?
面试题 01.08. 零矩阵
Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel
ACM Multimedia 2022 | 视觉语言预训练模型中社会偏见的反事实衡量和消除
[acwing] solution of the 58th weekly match
UML图记忆技巧
关系型数据库