-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
164 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// RegionViewController.swift | ||
// GeofenceTester | ||
// | ||
// Created by Alexander von Below on 26.06.22. | ||
// | ||
|
||
import UIKit | ||
import CoreLocation | ||
|
||
class RegionViewController: UIViewController { | ||
|
||
var locationManager: CLLocationManager! | ||
|
||
@IBOutlet var identifierLabel: UILabel! | ||
public var identifier: String! | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
identifierLabel.text = identifier; | ||
} | ||
|
||
@IBAction func deleteRegion() { | ||
|
||
for region in locationManager.monitoredRegions.filter({ region in | ||
region.identifier == identifier | ||
}) { | ||
locationManager.stopMonitoring(for: region) | ||
} | ||
self.dismiss(animated: true) | ||
} | ||
|
||
/* | ||
// MARK: - Navigation | ||
|
||
// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
// Get the new view controller using segue.destination. | ||
// Pass the selected object to the new view controller. | ||
} | ||
*/ | ||
|
||
} |
Oops, something went wrong.