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 C4 | |
import UIKit | |
class WorkSpace: CanvasController { | |
var screenRecorder: ScreenRecorder? | |
override func setup() { | |
self.screenRecorder = ScreenRecorder() | |
self.screenRecorder?.recordingEndedAction = { | |
self.screenRecorder?.showPreviewInController(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
// Copyright © 2014 C4 | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to | |
// deal in the Software without restriction, including without limitation the | |
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
// sell copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: The above copyright | |
// notice and this permission notice shall be included in all copies or | |
// substantial portions of the Software. |
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 | |
class WorkSpace: CanvasController { | |
var pdfContext: CGContext! | |
var shapes: [Shape]! | |
override func setup() { | |
shapes = [Shape]() | |
for i in 0..<10 { | |
let center = Point(Double(i) * 30.0, Double(i) * 30.0) | |
let circle = Circle(center: center, radius: 30.0) |
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
// Copyright © 2014 C4 | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to | |
// deal in the Software without restriction, including without limitation the | |
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
// sell copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: The above copyright | |
// notice and this permission notice shall be included in all copies or | |
// substantial portions of the Software. |
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
class WorkSpace: CanvasController { | |
override func setup() { | |
array2D() | |
} | |
func array2D() { | |
let maxDistance = distance(Point(), rhs: canvas.center) | |
canvas.backgroundColor = black | |
var pt = Point(8, 8) |
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 | |
class WorkSpace: CanvasController { | |
override func setup() { | |
sequenceAnimation() | |
} | |
func sequenceAnimation() { | |
let square = Rectangle(frame: Rect(0,0,100,100)) | |
square.center = canvas.center |
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
class ViewController: UIViewController, UIScrollViewDelegate { | |
@IBOutlet var scrollView: UIScrollView? | |
var elementSize = CGSizeZero | |
var grid = (6, 8) | |
var container: UIView? | |
override func viewDidLoad() { | |
scrollView?.delegate = self | |
elementSize = UIImage(named: "chop")!.size |
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
// | |
// ViewController.swift | |
// MMRun | |
// | |
// Created by travis on 2016-03-28. | |
// Copyright © 2016 C4. All rights reserved. | |
// | |
import UIKit |
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
// | |
// ViewController.swift | |
// Gestures | |
// | |
// Created by travis on 2016-03-28. | |
// Copyright © 2016 C4. All rights reserved. | |
// | |
import UIKit |
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
// | |
// ViewController.swift | |
// Gestures | |
// | |
// Created by travis on 2016-03-28. | |
// Copyright © 2016 C4. All rights reserved. | |
// | |
import UIKit |