//
|
// 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")
|
}
|
}
|