Skip to content

Instantly share code, notes, and snippets.

@rockarts
Created September 3, 2018 03:59
Show Gist options
  • Select an option

  • Save rockarts/5394d059f433b4e686278efffdb9483c to your computer and use it in GitHub Desktop.

Select an option

Save rockarts/5394d059f433b4e686278efffdb9483c to your computer and use it in GitHub Desktop.
// Setup navigation button
button = UIButton(frame: CGRect(x: 20, y: 50, width: self.mapView.frame.width - 40, height: 45))
button.setTitle("Tap to add points", for: .disabled)
button.setTitle("Start navigation", for: .normal)
button.backgroundColor = UIColor(red:0.77, green:0.77, blue:0.77, alpha:1.0)
button.addTarget(self, action: #selector(startNavigation(sender:)), for: .touchUpInside)
button.isEnabled = false
mapView.addSubview(button)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment