ℹ️ This article is also available on his blog.
Layout and Drawing are two different things:
- Layout defines only the positions and sizes of all views on screen.
- Drawing specifies how each view is rendered (how it looks).
<?xml version="1.0" encoding="UTF-8"?> | |
<Bucket | |
type = "2" | |
version = "2.0"> | |
<Breakpoints> | |
<!-- All Exceptions --> | |
<BreakpointProxy | |
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
<BreakpointContent |
public class Channel<Value> { | |
private class Subscription { | |
weak var object: AnyObject? | |
private let notifyBlock: (Value) -> Void | |
private let queue: DispatchQueue | |
var isValid: Bool { | |
return object != nil | |
} |
// | |
// AppDelegate.swift | |
// Scheduling | |
// | |
// Created by Shaps Benkau on 19/02/2018. | |
// Copyright © 2018 152percent Ltd. All rights reserved. | |
// | |
import UIKit |
extension XCUIApplication { | |
private struct Constants { | |
// Half way accross the screen and 10% from top | |
static let topOffset = CGVector(dx: 0.5, dy: 0.1) | |
// Half way accross the screen and 90% from top | |
static let bottomOffset = CGVector(dx: 0.5, dy: 0.9) | |
} | |
var screenTopCoordinate: XCUICoordinate { |
import Foundation | |
public enum Method: String { | |
case GET | |
case POST | |
case PUT | |
case PATCH | |
case DELETE | |
} |
import Foundation | |
@dynamicMemberLookup | |
final class DynamicUserDefaults { | |
static var standard: DynamicUserDefaults { | |
return DynamicUserDefaults(.standard) | |
} | |
private let keys = Keys() |
import Foundation | |
struct AnyEquatable { | |
private let isEqualTo: (Any) -> Bool | |
let value: Any | |
init<A: Equatable>(_ value: A) { | |
self.value = value | |
isEqualTo = { other in | |
guard let o = other as? A else { return false } |
// Douglas Hill, November 2019 | |
import UIKit | |
/// A scroll view that allows scrolling using a hardware keyboard like `NSScrollView`. | |
/// Supports arrow keys, option + arrow keys, command + arrow keys, space bar, page up, page down, home and end. | |
/// Limitations: | |
/// - Paging scroll views (isPagingEnabled = true) are not supported yet. | |
/// - The scroll view must become its own delegate so setting the delegate is not supported yet. | |
/// - Does not consider zooming. This has not been tested at all. |
import XCTest | |
@_functionBuilder | |
struct Test<T> { | |
var data: T | |
var given: given<T> | |
var when: when<T> | |
var then: then<T> | |
func execute() { |
ℹ️ This article is also available on his blog.
Layout and Drawing are two different things: