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 | |
struct Colors { | |
static let background = #colorLiteral(red: 0.657153666, green: 0.8692060113, blue: 0.6173200011, alpha: 1) | |
static let draggedBackground = #colorLiteral(red: 0.462745098, green: 0.7843137255, blue: 0.5764705882, alpha: 1) | |
static let tint = #colorLiteral(red: 0.1019607843, green: 0.4588235294, blue: 0.6235294118, alpha: 1) | |
} | |
protocol SlideToActionButtonDelegate: AnyObject { | |
func didFinish() |
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 DropDownButtonDelegate: AnyObject { | |
func didSelect(_ index: Int) | |
} | |
class DropDownButton: UIView { | |
let button: UIButton = { | |
let button = UIButton() |
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 GenericViewController<T: UIView>: UIViewController { | |
public var rootView: T { return view as! T } | |
override open func loadView() { | |
self.view = T() | |
} | |
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 | |
struct MovieInfo { | |
let title: String | |
let description: String | |
let cast: [ActorInfo] | |
} | |
struct ActorInfo { |
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 Checkbox: UIControl { | |
let checkedView: UIImageView = { | |
let view = UIImageView() | |
view.translatesAutoresizingMaskIntoConstraints = false | |
view.isHidden = true | |
view.image = UIImage(systemName: "checkmark")?.withRenderingMode(.alwaysTemplate) | |
view.tintColor = .white |