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 Foundation | |
| import UIKit // Only to use CGFloat 😬 | |
| import WatchKit | |
| enum WatchModelType { | |
| case large | |
| case small | |
| } | |
| struct WatchModel { |
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
| excluded: # paths to ignore during linting. Takes precedence over `included`. | |
| - Tests | |
| - Pods | |
| - Carthage | |
| - R.generated.swift | |
| - MyPlayground.playground | |
| disabled_rules: | |
| - trailing_whitespace | |
| - multiple_closures_trailing_closure |
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 Foundation | |
| import Intents | |
| struct SiriService { | |
| struct ActivityInformation { | |
| let activityType: String | |
| let activityTitle: String | |
| let activitySuggestedInvocation: String | |
| } |
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
| final class HistoryViewController: BaseViewController { | |
| override func viewDidAppear(_ animated: Bool) { | |
| super.viewDidAppear(animated) | |
| if let information = presenter?.information { | |
| activitySetup(information) | |
| } | |
| } | |
| } |
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
| func application(_ application: UIApplication, | |
| continue userActivity: NSUserActivity, | |
| restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { | |
| return handle(userAcitivity: userActivity) | |
| } | |
| // MARK: - Private | |
| private func handle(userAcitivity activity: NSUserActivity) -> Bool { | |
| switch activity.activityType { | |
| case "com.mobiquity.TakeUrPill.history": |
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 Foundation | |
| struct Email { | |
| private var string: String | |
| init(_ string: String) throws { | |
| try Validations.email(string) | |
| self.string = string | |
| } |
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
| @propertyWrapper | |
| struct EmailValidated { | |
| private(set) var defaultValue: String = "" | |
| var wrappedValue: String { | |
| get { defaultValue } | |
| set { defaultValue = maxLength(newValue) && isValid(newValue) | |
| ? | |
| newValue | |
| : |
OlderNewer