1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // BFThumImageView.swift
- // BFRecordScreenKit
- //
- // Created by 胡志强 on 2022/2/9.
- //
- import Foundation
- class BFThumImageView: UIImageView {
- var isHiddenBord = false{
- didSet{
- if let v = self.viewWithTag(12333){
- v.isHidden = isHiddenBord
- }
- }
- }
- override init(frame: CGRect) {
- super.init(frame: frame)
- addIndicationView()
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- override init(image: UIImage?) {
- super.init(image: image)
- addIndicationView()
- }
-
- func addIndicationView(){
- let bottomView = UIView()
- bottomView.backgroundColor = ThemeStyleColor
- addSubview(bottomView)
- bottomView.snp.makeConstraints { make in
- make.left.bottom.width.equalToSuperview()
- make.height.equalTo(6)
- }
-
- let line = UIView()
- line.backgroundColor = .black
- line.tag = 12333
- addSubview(line)
- line.snp.makeConstraints { make in
- make.right.top.bottom.equalToSuperview()
- make.width.equalTo(1)
- }
- }
- }
|