This file contains hidden or 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
import CoreLocation | |
static func vCardURL(from coordinate: CLLocationCoordinate2D, with name: String?) -> URL { | |
let vCardFileURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("vCard.loc.vcf") | |
let vCardString = [ | |
"BEGIN:VCARD", | |
"VERSION:4.0", | |
"FN:\(name ?? "Shared Location")", | |
"item1.URL;type=pref:http://maps.apple.com/?ll=\(coordinate.latitude),\(coordinate.longitude)", |
This file contains hidden or 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
import UIKit | |
enum SeparatorType { | |
case horizontal | |
case vertical | |
} | |
let kTotalSize: CGFloat = 18 // the total height of the separator (including parts that are not visible) | |
let kVisibleSize: CGFloat = 8 // the height of the visible portion of the separator | |
let kMargin: CGFloat = (kTotalSize - kVisibleSize) / 2 // the height of the non-visible portions of the separator (i.e. above and below the visible portion) |