无故事王国
2023-11-08 5f9cd3ae516f510a9475fd11f440fedf027aa4df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
//  CustomPointAnnotationView.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/11/2.
//
 
import UIKit
 
class CustomPointAnnotationView: MAAnnotationView {
 
    var label:UILabel!
 
    override init!(annotation: MAAnnotation!, reuseIdentifier: String!) {
        super.init(annotation: annotation, reuseIdentifier: reuseIdentifier)
        setUI()
    }
 
    override init(frame: CGRect) {
        super.init(frame: frame)
 
    }
 
 
    private func setUI(){
        label = UILabel(text: "")
        label.textColor = .white
        label.font = UIFont.systemFont(ofSize: 11, weight: .medium)
        addSubview(label)
        label.snp.makeConstraints { make in
            make.center.equalToSuperview().inset(UIEdgeInsets(top: -3, left: 0, bottom: 0, right: 0))
        }
    }
 
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
 
        
    }
 
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}