let alertController = UIAlertController(title: “Simple”, message: “Simple alertView demo with Cancel and Ok.”, preferredStyle: UIAlertControllerStyle.alert)let cancelAction = UIAlertAction(title: “Cancel”, style: UIAlertActionStyle.cancel) { (result : UIAlertAction) -> Void inprint(“Cancel”)}let okAction = UIAlertAction(title: “OK”, style: UIAlertActionStyle.default) { (result : UIAlertAction) -> Void inprint(“OK”)}alertController.addAction(cancelAction)alertController.addAction(okAction)self.present(alertController, animated: true, completion: nil)

let locMgr: INTULocationManager = INTULocationManager.sharedInstance()locMgr.requestLocation(withDesiredAccuracy: INTULocationAccuracy.block,
timeout: timeInterval,
delayUntilAuthorized: true,
block: {(currentLocation: CLLocation?, achievedAccuracy: INTULocationAccuracy, status: INTULocationStatus) -> Void in
if status == INTULocationStatus.success {
print(“got location”);
}
else {
print(“no location”)
}
})

GreenRobot LLC

iOS, Android, and Facebook apps and games By: @andytriboletti.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store