当前位置:网站首页>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
边栏推荐
- php短视频源码,点赞时会有大拇指动画飘起
- HDU - 2859 Phalanx(DP)
- 置信区间的画法
- Redis has three methods for checking big keys, which are necessary for optimization
- 现在mysql cdc2.1版本在解析值为0000-00-00 00:00:00的datetime类
- odps 中 对表进行了一次备份,为什么在元数据库查m_table 时,两张表的逻辑大小不一致,但数
- [acwing] solution of the 58th weekly match
- 1807. 替换字符串中的括号内容
- Open3d surface normal vector calculation
- 我在linux里面 通过调用odspcmd 查询数据库信息 怎么静默输出 就是只输出值 不要这个
猜你喜欢

Scala download and configuration

Xiangjiang Kunpeng joined the shengteng Wanli partnership program and continued to write a new chapter of cooperation with Huawei

Machine learning notes mutual information

玩转gRPC—深入概念与原理

嵌入式开发:技巧和窍门——提高嵌入式软件代码质量的7个技巧

【愚公系列】2022年7月 Go教学课程 003-IDE的安装和基本使用

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

Redis has three methods for checking big keys, which are necessary for optimization

Concurrent network modular reading notes transfer

【C语言进阶篇】数组&&指针&&数组笔试题
随机推荐
Open3d surface normal vector calculation
php短视频源码,点赞时会有大拇指动画飘起
MySQL存储数据加密
HDU - 2859 Phalanx(DP)
虚拟人产业面临的挑战
QT - double buffer plot
大厂的广告系统升级,怎能少了大模型的身影
力扣2_1480. 一维数组的动态和
New intersectionobserver usage notes
You don't have to run away to delete the library! Detailed MySQL data recovery
并列图的画法,多排多列
开户哪家券商比较好?网上开户安全吗
常用的开源无代码测试工具
文件读取写入
机器人相关课程考核材料归档实施细则2022版本
# 2156. Find the substring of the given hash value - post order traversal
idea中pom.xml依赖无法导入
现在mysql cdc2.1版本在解析值为0000-00-00 00:00:00的datetime类
TLA+ 入门教程(1):形式化方法简介
股票开户流程是什么?使用同花顺手机炒股软件安全吗?