shu223 / PulsingHalo

iOS Component for creating a pulsing animation.
MIT License
1.77k stars 240 forks source link

Halo not working in user location? #48

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello sir, thanks you for your library, the halo is not working for me, can you look in my code?

thanks :)

` let halo = PulsingHaloLayer()

    if annotation is MKUserLocation {
      let pin = mapView.view(for: annotation) as? MKPinAnnotationView ?? MKPinAnnotationView(annotation: annotation, reuseIdentifier: nil)
        pin.image = #imageLiteral(resourceName: "iphoneiconmap").resized(with: CGSize(width: 10, height: 25))

        halo.position = view.center
        pin.layer.addSublayer(halo)
        halo.backgroundColor = #colorLiteral(red: 0.7579909581, green: 0.6050492619, blue: 0.005667506656, alpha: 1)
        halo.start()

       return pin

    }`

the halo is showing but in the map not in the user location