当前位置:网站首页>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_ Palindrome number
- 制作条形码的手机App推荐
- Open3d surface normal vector calculation
- 傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
- 机器学习笔记 - 互信息Mutual Information
- PMO:比较25种分子优化方法的样本效率
- HDU - 2859 Phalanx(DP)
- # 2156. 查找给定哈希值的子串-后序遍历
- With this PDF, we finally got offers from eight major manufacturers, including Alibaba, bytek and Baidu
- 好用app推荐:扫描二维码、扫描条形码并查看历史
猜你喜欢
傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
智洋创新与华为签署合作协议,共同推进昇腾AI产业持续发展
Bizchart+slider to realize grouping histogram
使用 BlocConsumer 同时构建响应式组件和监听状态
Scala download and configuration
赋能数字经济 福昕软件出席金砖国家可持续发展高层论坛
bizchart+slider实现分组柱状图
力扣98:验证二叉搜索树
广电五舟与华为签署合作协议,共同推进昇腾AI产业持续发展
Huawei Nova 10 series released Huawei application market to build a solid application security firewall
随机推荐
BigFilter全局交易防重组件的介绍与应用
UML图记忆技巧
阿里推出新品牌“瓴羊”,致力成为“数字化领头羊”
使用 BlocConsumer 同时构建响应式组件和监听状态
服装企业为什么要谈信息化?
Convolutional neural network model -- lenet network structure and code implementation
好用app推荐:扫描二维码、扫描条形码并查看历史
idea中pom.xml依赖无法导入
Tiktok actual combat ~ the number of comments is updated synchronously
Bookmark
Is it safe to open an account in the stock of Caicai college? Can you only open an account by digging money?
1807. 替换字符串中的括号内容
ACM Multimedia 2022 | 视觉语言预训练模型中社会偏见的反事实衡量和消除
并发网络模块化 读书笔记转
# 2156. 查找给定哈希值的子串-后序遍历
PostgreSQLSQL高级技巧透视表
[advanced C language] array & pointer & array written test questions
# 2156. Find the substring of the given hash value - post order traversal
How can the advertising system of large factories be upgraded without the presence of large models
Play with grpc - go deep into concepts and principles