当前位置:网站首页>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
边栏推荐
- 面试题 01.08. 零矩阵
- 服务线上治理
- [advanced C language] array & pointer & array written test questions
- Redis has three methods for checking big keys, which are necessary for optimization
- 283. 移动零-c与语言辅助数组法
- Kdd2022 | what features are effective for interaction?
- odps 中 对表进行了一次备份,为什么在元数据库查m_table 时,两张表的逻辑大小不一致,但数
- MongoDB中的索引操作总结
- 高中物理:直线运动
- Scala download and configuration
猜你喜欢

TCP protocol three times handshake process

2022-07-04:以下go语言代码输出什么?A:true;B:false;C:编译错误。 package main import “fmt“ func main() { fmt.Pri

可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成

Concurrent network modular reading notes transfer

Radio and television Wuzhou signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry

复数在数论、几何中的用途 - 曹则贤

Play with grpc - go deep into concepts and principles

B站大量虚拟主播被集体强制退款:收入蒸发,还倒欠B站;乔布斯被追授美国总统自由勋章;Grafana 9 发布|极客头条

抖音实战~评论数量同步更新

Tiktok actual combat ~ the number of comments is updated synchronously
随机推荐
Is it safe to open an account in the stock of Caicai college? Can you only open an account by digging money?
好用app推荐:扫描二维码、扫描条形码并查看历史
WebGIS framework -- kalrry
机器人相关课程考核材料归档实施细则2022版本
Machine learning notes mutual information
Representation of confidence interval
1807. Replace the parentheses in the string
网上开户哪家证券公司佣金最低,我要开户,网上开户安全吗
Concurrent optimization summary
什么是商业智能(BI),就看这篇文章足够了
Locust性能测试 —— 环境搭建及使用
BigFilter全局交易防重组件的介绍与应用
【Acwing】第58场周赛 题解
力扣3_383. 赎金信
力扣98:验证二叉搜索树
Open3d surface normal vector calculation
从RepVgg到MobileOne,含mobileone的代码
微服务--开篇
NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
Bookmark