IHIHAnotationView.swift 645 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // IHIHAnotationView.swift
  3. // Inhealth
  4. //
  5. // Created by weclouds on 2019/12/13.
  6. // Copyright © 2019 weclouds. All rights reserved.
  7. //
  8. import UIKit
  9. import MapKit
  10. enum AnotationState {
  11. case normal
  12. case selected
  13. }
  14. class IHIHAnotationView: MKAnnotationView {
  15. override var isSelected: Bool{
  16. didSet{
  17. if self.isSelected == false {
  18. image = UIImage(named: "地图选中点")
  19. }else{
  20. image = UIImage(named: "地图未选中点")
  21. }
  22. self.image = image
  23. }
  24. }
  25. deinit {
  26. log.debug("IHIHAnotationView销毁")
  27. }
  28. }