Github markdown full-width 2 column table.
|
---|
// Copyright © 2020 Flinesoft. All rights reserved. | |
import Foundation | |
import SwiftUI | |
public struct SafeLocalizedStringKey : | |
ExpressibleByStringLiteral, | |
ExpressibleByStringInterpolation, | |
ExpressibleByExtendedGraphemeClusterLiteral, | |
ExpressibleByUnicodeScalarLiteral, |
import AVFoundation | |
import SwiftUI | |
import PlaygroundSupport | |
struct SwiftUIAudioPlayerView: View { | |
/// the audio player that will play your audio file. Can't be a local variable. | |
/// Must be a `@State` property because we need to modify it later | |
@State var audioPlayer: AVAudioPlayer? | |
// TODO: setting window transforms (or mission control) flattens layers... | |
// TODO: Mask image vs path (layer)? | |
/// `NSVisualEffectView`: | |
/// | |
/// A view that adds translucency and vibrancy effects to the views in your interface. | |
/// When you want views to be more prominent in your interface, place them in a | |
/// backdrop view. The backdrop view is partially transparent, allowing some of | |
/// the underlying content to show through. Typically, you use a backdrop view | |
/// to blur background content, instead of obscuring it completely. It can also |
extension CGPoint { | |
static func * (left: CGPoint, scalar: CGFloat) -> CGPoint { | |
return CGPoint(x: left.x * scalar, y: left.y * scalar) | |
} | |
static func * (scalar: CGFloat, right: CGPoint) -> CGPoint { | |
return CGPoint(x: right.x * scalar, y: right.y * scalar) | |
} | |
static func + (left: CGPoint, right: CGPoint) -> CGPoint { |
import SwiftUI | |
import enum Accelerate.vDSP | |
struct AnimatableVector: VectorArithmetic { | |
static var zero = AnimatableVector(values: [0.0]) | |
static func + (lhs: AnimatableVector, rhs: AnimatableVector) -> AnimatableVector { | |
let count = min(lhs.values.count, rhs.values.count) | |
return AnimatableVector(values: vDSP.add(lhs.values[0..<count], rhs.values[0..<count])) | |
} |
// | |
// SnapCarousel.swift | |
// prototype5 | |
// | |
// Created by xtabbas on 5/7/20. | |
// Copyright © 2020 xtadevs. All rights reserved. | |
// | |
import SwiftUI |
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
final class SampleCollectionReusableView: UICollectionReusableView { | |
private let titleLabel = UILabel() | |
override init(frame: CGRect) { | |
super.init(frame: frame) |
import UIKit | |
#if canImport(SwiftUI) && DEBUG | |
import SwiftUI | |
struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable { | |
let viewController: ViewController | |
init(_ builder: @escaping () -> ViewController) { | |
viewController = builder() | |
} |
Quick guide on how to setup git signing. Information is aggregated from following sources: