Skip to content

Instantly share code, notes, and snippets.

@agustr
agustr / CustomView.swift
Created December 1, 2020 18:35
boilerplate code for view controllers root view
// boilerplate for uiview subclass that is intended to be used as uiviewcontrollers
// root view using constraints.
class CustomView: UIView {
// custom views should override this to return true if
// they cannot layout correctly using autoresizing.
// from apple docs https://developer.apple.com/documentation/uikit/uiview/1622549-requiresconstraintbasedlayout
override class var requiresConstraintBasedLayout: Bool {
return true
}
//
// CGSize+Utilities.swift
// STHLMPubCrawl
//
// Created by Agust Rafnsson on 02/10/15.
// Copyright © 2015 Agust Rafnsson. All rights reserved.
//
import UIKit