Skip to content

Instantly share code, notes, and snippets.

import UIKit
import AsyncDisplayKit
final class NewChatViewController: ASViewController<ASDisplayNode>, ASTableDataSource, ASTableDelegate {
struct State {
var itemCount: Int
var fetchingMore: Bool
static let empty = State(itemCount: 0, fetchingMore: false)
}
enum Language: String {
case ru = "ru"
case en = "en"
var collectionsUrlKey: String {
switch self {
case .ru: return "/versions/2/locals/ru/collections"
case .en: return "/versions/2/locals/en/collections"
}
}
@IBOutlet weak var testGif: UIImageView!
testGif.kf.setImage(with: (URL(string: "https://media.giphy.com/media/3oxHQJ4XBS92dvXm92/giphy.gif")!))
@n1kron
n1kron / json
Created October 15, 2017 13:16
import UIKit
struct Post : Decodable {
var userId: Int = 1
var id: Int
var title: String
var body: String
}