This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
import UIKit | |
@IBDesignable | |
class SpinnerView : UIView { | |
override var layer: CAShapeLayer { | |
get { | |
return super.layer as! CAShapeLayer | |
} | |
} |
//: Playground - noun: a place where people can play | |
import UIKit | |
import AVFoundation | |
// keep it running forever so it plays audio | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely(true) | |
class AVPlayerTest { |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
// | |
// AutocompleteView.swift | |
// | |
// Originally created by Daniel Weber on 9/28/14. | |
// Copyright (c) 2014 Null Creature. All rights reserved. | |
// Ported to Swift by Martin Pichlmair 2018 | |
// | |
import Cocoa |
Worth a read for some more context.
Create the file in the root of the project (where your Package.swift
file lives as well), and use the following contents:
/// Package.xcconfig
// | |
// UserDefaults+PropertyWrapper.swift | |
// PodliveShared | |
// | |
// Created by Stefan Trauth on 18.06.19. | |
// Copyright © 2019 Stefan Trauth. All rights reserved. | |
// | |
import Foundation |
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ | |
import Combine | |
import SwiftUI |
import SwiftUI | |
fileprivate extension DateFormatter { | |
static var month: DateFormatter { | |
let formatter = DateFormatter() | |
formatter.dateFormat = "MMMM" | |
return formatter | |
} | |
static var monthAndYear: DateFormatter { |
class ExpansionHandler<T: Equatable>: ObservableObject { | |
@Published private (set) var expandedItem: T? | |
func isExpanded(_ item: T) -> Binding<Bool> { | |
return Binding( | |
get: { item == self.expandedItem }, | |
set: { self.expandedItem = $0 == true ? item : nil } | |
) | |
} |