当前位置:网站首页>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
边栏推荐
- How can the advertising system of large factories be upgraded without the presence of large models
- Cadre WebGIS - kalrry
- QT - plot other problems
- Xiangjiang Kunpeng joined the shengteng Wanli partnership program and continued to write a new chapter of cooperation with Huawei
- 凭借了这份 pdf,最终拿到了阿里,字节,百度等八家大厂 offer
- vim 从嫌弃到依赖(23)——最后的闲扯
- odps 中 对表进行了一次备份,为什么在元数据库查m_table 时,两张表的逻辑大小不一致,但数
- 智洋创新与华为签署合作协议,共同推进昇腾AI产业持续发展
- [acwing] solution of the 58th weekly match
- MongoDB中的索引操作总结
猜你喜欢
力扣98:验证二叉搜索树
【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】
并发优化总结
TLA+ 入门教程(1):形式化方法简介
Huawei Nova 10 series released Huawei application market to build a solid application security firewall
抖音实战~评论数量同步更新
从RepVgg到MobileOne,含mobileone的代码
卷积神经网络模型之——LeNet网络结构与代码实现
Concurrent network modular reading notes transfer
PMO:比较25种分子优化方法的样本效率
随机推荐
微服务--开篇
DevEco Device Tool 3.0 Release带来5大能力升级,让智能设备开发更高效
Ascendex launched Walken (WLKN) - an excellent and leading "walk to earn" game
HUAWEI nova 10系列发布 华为应用市场筑牢应用安全防火墙
机器学习笔记 - 互信息Mutual Information
TCP protocol three times handshake process
并发网络模块化 读书笔记转
开户哪家券商比较好?网上开户安全吗
KDD2022 | 什么特征进行交互才是有效的?
NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
PMO:比较25种分子优化方法的样本效率
国产数据库乱象
HDU - 1078 FatMouse and Cheese(记忆化搜索DP)
leetcode 72. Edit Distance 编辑距离(中等)
大厂的广告系统升级,怎能少了大模型的身影
将QA引入软件开发生命周期是工程师要遵循的最佳实践
Nat. Commun.| 机器学习对可突变的治疗性抗体的亲和力和特异性进行共同优化
Zhiyang innovation signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry
玩转gRPC—深入概念与原理
Sqlserver encrypts and decrypts data