1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //
- // PQCuttingPointView.swift
- // PQSpeed
- //
- // Created by SanW on 2021/5/12.
- // Copyright © 2021 BytesFlow. All rights reserved.
- //
- import UIKit
- class PQCuttingPointView: UIView {
- lazy var pointView: UIView = {
- let pointView = UIView()
- pointView.addCorner(corner: 1.5)
- pointView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
- return pointView
- }()
- lazy var dragingImageView: UIImageView = {
- let dragingImageView = UIImageView(image: UIImage().BF_Image(named: "stuckPoint_dragingImage").withRenderingMode(.alwaysTemplate))
- dragingImageView.tintColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
- return dragingImageView
- }()
- override init(frame: CGRect) {
- super.init(frame: frame)
- isUserInteractionEnabled = true
- addSubview(pointView)
- addSubview(dragingImageView)
- dragingImageView.frame = CGRect(x: (frame.width - 12) / 2, y: frame.height - 14, width: 12, height: 14)
- pointView.frame = CGRect(x: (frame.width - 3) / 2, y: 0, width: 3, height: frame.height - dragingImageView.frame.height + 2)
- }
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- deinit {
- BFLog(message: "卡点裁剪-指示器销毁")
- }
- }
|