enum PostType {
case text(text: String)
case image(image: UIImage, legend: String)
case video(url: URL, duration: TimeInterval)
}
struct Post {
let date: Date
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
import Foundation | |
import Contacts | |
import MapKit | |
// MARK: - Distatnce formatter | |
fileprivate let _distanceFormatter: MKDistanceFormatter = { | |
let formatter = MKDistanceFormatter() | |
return formatter | |
}() |
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
import UIKit | |
extension UIStoryboard { | |
/// Main storyboard | |
public var main: UIStoryboard { | |
return UIStoryboard(name: "Main", bundle: nil) | |
} | |
/// Instantiates and returns the view controller with the specified identifier. | |
/// | |
/// - Parameter identifier: uniquely identifies equals to Class name |
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
////////////////////////////////// | |
if case 200 ... 299 = statusCode { | |
// do something | |
} |
OlderNewer