This file contains hidden or 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
// | |
// Original implementation: https://stackoverflow.com/a/39177861/638848 | |
// | |
// Re-made by: Leslie Godwin ([email protected]) | |
import 'dart:convert'; | |
/// Parses/splits a command-line String into a List<String> of the individual argument elements. | |
/// Handles whitespace, quotes and back\slash escape. | |
/// |
This file contains hidden or 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 | |
// π°π» Generic<> stored static fields workaround. | |
// | |
private var _MyClass_static: [ObjectIdentifier : Any] = [:] // need some global space | |
// | |
class MyClass<T> | |
{ | |
typealias StaticClass = MyClassStatic<Self> | |
This file contains hidden or 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
/// | |
/// π° Layered Cakewalk | |
/// | |
/// Gets all defined `Swift` and `Objective-C` classes. | |
/// | |
public static func allTypes() -> [AnyObject.Type] | |
{ | |
let typeCount = Int(objc_getClassList(nil, 0)) | |
let types = UnsafeMutablePointer<AnyObject.Type>.allocate(capacity: typeCount) |
This file contains hidden or 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 | |
/// | |
/// π° Layered Cakewalk - AttributesStyle | |
/// | |
/// Allows you to structure style classes used to modify an `NSAttributedString`s. | |
/// | |
// |
This file contains hidden or 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 | |
/// | |
/// π° Layered Cakewalk - UITextViewWithAutoLayout | |
/// | |
/// A UITextView that has an `intrinsicContentSize` equal to the content size. | |
/// | |
class UITextViewWithAutoLayout : UITextView | |
{ |