当前位置:网站首页>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
边栏推荐
- Nat. Commun.| Machine learning jointly optimizes the affinity and specificity of mutagenic therapeutic antibodies
- Use blocconsumer to build responsive components and monitor status at the same time
- i. Mx6ull driver development | 24 - platform based driver model lights LED
- Force buckle 2_ 1480. Dynamic sum of one-dimensional array
- 【米哈游2023届秋招】开启【校招唯一专属内推码EYTUC】
- close系统调用分析-性能优化
- Open3d surface normal vector calculation
- 短视频系统源码,点击屏幕空白处键盘不自动收起
- MySQL storage data encryption
- Force buckle_ Palindrome number
猜你喜欢

智洋创新与华为签署合作协议,共同推进昇腾AI产业持续发展

Energy momentum: how to achieve carbon neutralization in the power industry?

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

并发优化总结

TCP协议三次握手过程

Sorting and sharing of selected papers, systems and applications related to the most comprehensive mixed expert (MOE) model in history

力扣98:验证二叉搜索树

Convolutional neural network model -- lenet network structure and code implementation

Machine learning notes mutual information

保证接口数据安全的10种方案
随机推荐
傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
Interview question 01.01 Determine whether the character is unique
面试题 01.01. 判定字符是否唯一
Force buckle 3_ 383. Ransom letter
QT - double buffer plot
Common open source codeless testing tools
[advanced C language] array & pointer & array written test questions
1807. Replace the parentheses in the string
抖音实战~评论数量同步更新
【Acwing】第58场周赛 题解
嵌入式开发:技巧和窍门——提高嵌入式软件代码质量的7个技巧
大厂的广告系统升级,怎能少了大模型的身影
MySQL storage data encryption
New intersectionobserver usage notes
阿里推出新品牌“瓴羊”,致力成为“数字化领头羊”
Common shortcut keys for hbuilder x
Concurrent optimization summary
You don't have to run away to delete the library! Detailed MySQL data recovery
微服务--开篇
El tree combined with El table, tree adding and modifying operations