Skip to content

Instantly share code, notes, and snippets.

@psql
Created March 4, 2016 21:54
Show Gist options
  • Select an option

  • Save psql/92dba05f11fafcd1ff09 to your computer and use it in GitHub Desktop.

Select an option

Save psql/92dba05f11fafcd1ff09 to your computer and use it in GitHub Desktop.
//
// ViewController.swift
// test
//
// Created by Pasquale DSilva on 3/4/16.
// Copyright © 2016 Pasquale DSilva. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.view.backgroundColor = UIColor.blackColor()
let coloredSquare = UIView()
coloredSquare.backgroundColor = UIColor.blueColor()
coloredSquare.frame = CGRect(x: 20, y: 100, width: 100, height: 100)
self.view.addSubview(coloredSquare)
UIView.animateWithDuration(2, animations: {
coloredSquare.backgroundColor = UIColor.redColor()
coloredSquare.frame = CGRect(x: 300, y: 488, width: 40, height: 80)
coloredSquare.transform = CGAffineTransformMakeRotation(60)
}, completion: {
(value: Bool) in
print("hello poopface!!!!")
})
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment