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 RxCocoa | |
import RxSwift | |
import SwiftSoup | |
struct Post { | |
let id: String | |
} | |
class Test { |
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
platform :ios, '11.0' | |
use_frameworks! | |
def crawler | |
pod 'SwiftSoup' | |
end | |
def reactivex | |
pod 'RxCocoa' |
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
swiftlint_version: 0.32.0 | |
excluded: | |
- Pods/ | |
identifier_name: | |
min_length: 2 | |
line_length: | |
ignores_comments: true |
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 | |
protocol Zeroes { | |
static var zero: Self { get } | |
} | |
extension Int: Zeroes {} | |
extension Int8: Zeroes {} | |
extension Int16: Zeroes {} | |
extension Int32: Zeroes {} |
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 | |
enum TypeKey: CodingKey { | |
case type | |
} | |
protocol TypeFamily: Decodable { | |
associatedtype Member: Decodable | |
var type: Member.Type { get } | |
} |
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 | |
class SessionDelegate: NSObject, URLSessionDelegate { | |
func urlSession( | |
_ session: URLSession, | |
didReceive challenge: URLAuthenticationChallenge, | |
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void | |
) { | |
guard challenge.protectionSpace.host != URL.sns.host else { | |
completionHandler(.performDefaultHandling, nil) |
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 | |
class ViewController: UIViewController { | |
private var customInput = false | |
private let textInput = UITextField() | |
private var leadingBarButtonGroups: [UIBarButtonItemGroup] = [] | |
private var trailingBarButtonGroups: [UIBarButtonItemGroup] = [] | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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 | |
enum JSON { | |
case null | |
case bool(Bool) | |
case int64(Int64) | |
case double(Double) | |
case string(String) | |
indirect case array([JSON]) | |
indirect case dictionary([String: JSON]) |
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 | |
class ViewController: UIViewController { | |
var yearView: UIView? | |
var currentYear: Int = 2020 { | |
didSet { | |
createYearView() | |
} | |
} |
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 | |
protocol ScrollingContent: Comparable {} | |
protocol ScrollingContentProvider { | |
associatedtype Content: ScrollingContent | |
func previous(of content: Content) -> Content | |
func next(of content: Content) -> Content | |
} |
OlderNewer