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
fileprivate extension UIColor { | |
convenience init(red: Int, green: Int, blue: Int) { | |
assert(red >= 0 && red <= 255, "Invalid red component") | |
assert(green >= 0 && green <= 255, "Invalid green component") | |
assert(blue >= 0 && blue <= 255, "Invalid blue component") | |
self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0) | |
} | |
convenience init(red: Int, green: Int, blue: Int, opacity: CGFloat) { |
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 | |
struct FaqCategory: Equatable { | |
let id: Int | |
let name: String | |
let items: [FaqItem] | |
} | |
func ==(lhs: FaqCategory, rhs: FaqCategory) -> Bool { | |
return lhs.id == rhs.id | |
} |
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
// | |
// LogManager.swift | |
// | |
// Created by Rutger Bresjer on 30/11/2016. | |
// Copyright © 2016 Woost. All rights reserved. | |
// | |
import Foundation | |
import RxSwift |
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
/////////////////////////////////////// | |
// - Non-functional | |
/////////////////////////////////////// | |
var buffer: [Match] = [] | |
var bufferDate: Int = 0 | |
var sections: [FeedSection] = [] | |
for match in matches { | |
if bufferDate != match.createdAt.dateInt { | |
if let firstMatch = buffer.first { |
NewerOlder