当前位置:网站首页>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
边栏推荐
- Force buckle 3_ 383. Ransom letter
- 【愚公系列】2022年7月 Go教学课程 003-IDE的安装和基本使用
- 文件读取写入
- Jvm-Sandbox-Repeater的部署
- 从RepVgg到MobileOne,含mobileone的代码
- bizchart+slider实现分组柱状图
- 我在linux里面 通过调用odspcmd 查询数据库信息 怎么静默输出 就是只输出值 不要这个
- new IntersectionObserver 使用笔记
- Radio and television Wuzhou signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry
- How to transfer to software testing, one of the high paying jobs in the Internet? (software testing learning roadmap attached)
猜你喜欢

Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel

Cloudcompare & open3d DBSCAN clustering (non plug-in)

É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)

QT - double buffer plot
![[advanced C language] array & pointer & array written test questions](/img/3f/83801afba153cfc0dd73aa8187ef20.png)
[advanced C language] array & pointer & array written test questions

Why do you have to be familiar with industry and enterprise business when doing Bi development?
【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】

Deveco device tool 3.0 release brings five capability upgrades to make intelligent device development more efficient

机器学习笔记 - 互信息Mutual Information

常用的开源无代码测试工具
随机推荐
El tree combined with El table, tree adding and modifying operations
PMO:比较25种分子优化方法的样本效率
The drawing method of side-by-side diagram, multi row and multi column
How to transfer to software testing, one of the high paying jobs in the Internet? (software testing learning roadmap attached)
From repvgg to mobileone, including mobileone code
面试题 01.08. 零矩阵
傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
HBuilder X 常用的快捷键
QT - double buffer plot
Relational database
PostgreSQLSQL高级技巧透视表
Sqlserver encrypts and decrypts data
Bookmark
HDU - 2859 Phalanx(DP)
Force buckle_ Palindrome number
Sorting and sharing of selected papers, systems and applications related to the most comprehensive mixed expert (MOE) model in history
从RepVgg到MobileOne,含mobileone的代码
What is business intelligence (BI), just look at this article is enough
【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】
阿里推出新品牌“瓴羊”,致力成为“数字化领头羊”