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 ResizableRectangle: UIView { | |
private let borderWidth: CGFloat = 10 | |
private var halfOfBorderWidth: CGFloat { return borderWidth / 2 } | |
private let topControl = Control(position: .top) | |
private let upperRightControl = Control(position: .upperRight) | |
private let rightControl = Control(position: .right) | |
private let lowerRightControl = Control(position: .lowerRight) |
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 | |
import PlaygroundSupport | |
let page = PlaygroundPage.current | |
page.needsIndefiniteExecution = true | |
protocol Message {} | |
struct TextMessage: Message, Decodable { | |
var text: String? |