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 | |
import Foundation | |
func compareVersions(version1: String, version2: String) -> ComparisonResult { | |
let version1Components = version1.components(separatedBy: ".") | |
let version2Components = version2.components(separatedBy: ".") | |
let length = max(version1Components.count, version2Components.count) | |
for i in 0 ..< length { |
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
// | |
// NotificationService.swift | |
// | |
// Created by Luka Gabric on 12/04/2017. | |
// Copyright © 2017 Luka Gabric. All rights reserved. | |
// | |
import UserNotifications | |
import NotificationServiceExtensionCommon |
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
public struct MyValueType { | |
public var name: String = "My name" | |
mutating func update(name newName: String) { | |
name = newName | |
} | |
} |