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
/** | |
``` | |
Thread 1 Queue : com.apple.main-thread (serial) | |
#0 0x00007fff2cb8dead in swift_retain () | |
#1 0x00007fff2cb90e55 in swift::metadataimpl::ValueWitnesses<swift::metadataimpl::SwiftRetainableBox>::initializeWithCopy(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*) () | |
#2 0x00007fff2cbaf29d in swift::metadataimpl::ValueWitnesses<swift::metadataimpl::OpaqueExistentialBox<1u> >::initializeWithCopy(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*) () | |
#3 0x00007fff421b8f10 in outlined init with copy of ViewList? () | |
#4 0x00007fff421b8e1a in TransformedList.TransformItem.apply(sublist:) () | |
#5 0x00007fff421b8e3e in TransformedList.TransformItem.apply(sublist:) () | |
#6 0x00007fff421b8783 in closure #1 in ViewList.visitChildNodes(from:transform:applying:) () |
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
// | |
// FormDemoApp.swift | |
// FormDemo | |
// | |
// Created by Marc Prud'hommeaux | |
// | |
import SwiftUI | |
@main |
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
// | |
// ContentView.swift | |
// AlignDemo | |
// | |
// Created by Marc Prud'hommeaux on 2/28/20. | |
// Copyright © 2020 Glimpse I/O. All rights reserved. | |
// | |
import SwiftUI |
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
// | |
// Demonstration of how to use `anchorPreference` to mimic the floating selection | |
// behavior of `SegmentedPickerStyle`. | |
// | |
// Created by Marc Prud'hommeaux on 12/10/19. | |
// | |
import SwiftUI | |
public extension View { |
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
/// A color instance that can be expressed by red, green, blue, and alpha components. | |
/// | |
/// Conformed to by: | |
/// - `CoreGraphics.CGColor` | |
/// - `CoreImage.CIColor` | |
/// - `UIKit.UIColor` | |
/// - `AppKit.NSColor` | |
/// - `SwiftUI.Color` | |
public protocol ExpressibleByColorComponents { | |
/// Create an instance of this color from the given color components. |
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
#if os(macOS) | |
import AppKit | |
public typealias UXImage = NSImage | |
#elseif os(iOS) | |
import UIKit | |
public typealias UXImage = UIImage | |
#endif | |
/// Extensions for system images included in SF Symbols | |
@available(macOS 10.15, iOS 13.0, *) |
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
// | |
// SHA1.swift | |
// Glib | |
// | |
// Created by Marc Prud'hommeaux on 5/1/18. | |
// Copyright © 2018 Marc Prud'hommeaux. All rights reserved. | |
// | |
// A single-file conversion of the SHA1 code from: CryptoSwift | |
// | |
// Copyright (C) 2014-2017 Marcin Krzyżanowski <[email protected]> |
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
public extension NSURL { | |
/// Creates a zip archive of the file/folder represented by this URL and returns a references to the zipped file | |
/// | |
/// - parameter dest: the destination URL; if nil, the destination will be this URL with ".zip" appended | |
func zip(dest: NSURL? = nil) throws -> NSURL { | |
let destURL = dest ?? self.URLByAppendingPathExtension("zip") | |
let fm = NSFileManager.defaultManager() | |
var isDir: ObjCBool = false |
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
// | |
// Demonstration of using a channel to receive and dispatch IOHIDManager events using the ChannelZ framework. | |
// | |
// Created by Marc Prud'hommeaux on 3/8/15. | |
// | |
import Cocoa | |
import IOKit | |
import ChannelZ | |
@NSApplicationMain |
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
/// InversionOfExecution.swift – Marc Prud'hommeaux <[email protected]> | |
/// | |
/// Demonstration of an *Inversion of Execution* (**IoE**) technique for how the same function | |
/// can be executed either synchronously with a return value or asynchronously with a | |
/// callback block depending on an optional trailing `iex` (inverted executor closure. | |
/// | |
/// • When executed without a trailing closure, the result is provided as a return value: | |
/// | |
/// `let result: Int = sum([1, 2])` | |
/// |