//
//
// Created by dongqiangfei on 2022/12/2.
//
override init(frame: CGRect) {
}
required init?(coder aDecoder: NSCoder) {
fatalError(“init(coder) has not been implemented“)
}
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
}
}
/* swift
let overlay = UIViewOverLay(frame: self.window!.bounds)
overlay.translatesAutoresizingMaskIntoConstraints = false
overlay.backgroundColor = .lightGray
overlay.layer.compositingFilter = “saturationBlendMode”
*/
/* oc
@interface UIViewOverLay : UIView
@end
@implementation UIViewOverLay
-(UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
}
@end
UIWindow *window = App的Window;
UIViewOverLay *overlay = [[UIViewOverLay alloc]initWithFrame:self.window.bounds];
overlay.translatesAutoresizingMaskIntoConstraints = false;
overlay.backgroundColor = [UIColor lightGrayColor];
overlay.layer.compositingFilter = @”saturationBlendMode“;
————————————————
*/
原文地址:https://blog.csdn.net/qq_35122556/article/details/128143375
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_29234.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!