当前位置:网站首页>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
边栏推荐
- Zhiyang innovation signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry
- Force buckle 2_ 1480. Dynamic sum of one-dimensional array
- 股票开户流程是什么?使用同花顺手机炒股软件安全吗?
- DevEco Device Tool 3.0 Release带来5大能力升级,让智能设备开发更高效
- TCP协议三次握手过程
- Why should garment enterprises talk about informatization?
- ApacheCN 翻译、校对、笔记整理活动进度公告 2022.7
- HBuilder X 常用的快捷键
- 电话加密,中间4为****代替
- 力扣98:验证二叉搜索树
猜你喜欢

Cloudcompare & open3d DBSCAN clustering (non plug-in)

从RepVgg到MobileOne,含mobileone的代码

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

凭借了这份 pdf,最终拿到了阿里,字节,百度等八家大厂 offer

虚拟人产业面临的挑战

Kdd2022 | what features are effective for interaction?

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

Why do you have to be familiar with industry and enterprise business when doing Bi development?

KDD2022 | 什么特征进行交互才是有效的?

Bookmark
随机推荐
VIM from dislike to dependence (23) -- the last gossip
É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)
服务线上治理
El tree combined with El table, tree adding and modifying operations
制作条形码的手机App推荐
Energy momentum: how to achieve carbon neutralization in the power industry?
Concurrent optimization summary
将QA引入软件开发生命周期是工程师要遵循的最佳实践
Locust性能测试 —— 环境搭建及使用
Tiktok actual combat ~ the number of comments is updated synchronously
30余家机构联合发起数字藏品行业倡议,未来会如何前进?
Kdd2022 | what features are effective for interaction?
NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
短视频系统源码,点击屏幕空白处键盘不自动收起
HDU - 1078 fatmouse and cheese (memory search DP)
i.MX6ULL驱动开发 | 24 - 基于platform平台驱动模型点亮LED
PostgreSQL服务端编程聚合和分组
抖音实战~评论数量同步更新
Huawei Nova 10 series released Huawei application market to build a solid application security firewall
Spatiotemporal prediction 3-graph transformer