Unverified Commit fac09534 authored by Zach Knox's avatar Zach Knox
Browse files

a start on the share button

parent 13580a7d
{
"images" : [
{
"idiom" : "universal",
"filename" : "shareIcon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "shareIcon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "shareIcon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -69,6 +69,10 @@ class FacilityDetailViewController: UIViewController, UITableViewDelegate, UITab
@IBAction func shareFacility(_ sender: Any) {
let coordinates = CLLocationCoordinate2DMake((facility.facilityLocation?.coordinates?.coords?.last)!, (facility.facilityLocation?.coordinates?.coords?.first)!)
let placemark = MKPlacemark(coordinate: coordinates, addressDictionary: nil)
let shareSheet = UIActivityViewController(activityItems: [facility.facilityName], applicationActivities: nil)
present(shareSheet, animated: true, completion: nil)
}
/**
......@@ -139,6 +143,11 @@ class FacilityDetailViewController: UIViewController, UITableViewDelegate, UITab
directionsButton.backgroundColor = #colorLiteral(red: 0, green: 0.4793452024, blue: 0.9990863204, alpha: 1)
directionsButton.layer.cornerRadius = 10
directionsButton.setTitle("View in Maps", for: .normal)
shareButton.tintColor = UIColor.white
shareButton.backgroundColor = UIColor.orange
shareButton.layer.cornerRadius = 10
shareButton.setImage(#imageLiteral(resourceName: "shareIcon"), for: .normal)
shareButton.setTitle("", for: .normal)
OpenTimesList.bounces = false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment