Skip to content

Instantly share code, notes, and snippets.

Okke Timm okket

Block or report user

Report or block okket

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View QuickLook.swift
// Custom QuickLook objects in Playground, see
// http://ericasadun.com/2014/06/26/swift-adding-custom-quick-look-to-your-classes/
import UIKit
@objc class BezierCircle {
var color : UIColor
var path : UIBezierPath
var radius : Double
init (_ radius : Double, _ color : UIColor = UIColor.redColor()) {
View Reflections.swift
import Foundation
func typestring(x : Any) -> String
{
if let obj = x as? NSObject {
return NSStringFromClass((x as NSObject).dynamicType)
}
// Native Swift
switch x {
@okket
okket / AVAudioEngine.swift
Last active Dec 27, 2017
AVAudioEngine in Playground
View AVAudioEngine.swift
// AVAudioEngine Playground - requires OS X 10.10
import Cocoa
import AVFoundation
// Keep playground running
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true)
// Setup engine and node instances
var engine = AVAudioEngine()
You can’t perform that action at this time.