Skip to content

Instantly share code, notes, and snippets.

@DonMag
Last active February 20, 2017 16:56
Show Gist options
  • Select an option

  • Save DonMag/844b033ddb5bcfa9755e317d8c1bfb4e to your computer and use it in GitHub Desktop.

Select an option

Save DonMag/844b033ddb5bcfa9755e317d8c1bfb4e to your computer and use it in GitHub Desktop.
import UIKit
class ViewController: UIViewController {
@IBOutlet var MatabiauButton: UIButton!
@IBOutlet var PDFButton: UIButton!
@IBOutlet var Button360: UIButton!
@IBOutlet var VideoButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
var r = self.MatabiauButton.frame
r.origin.x += r.size.width / 2.0
self.MatabiauButton.frame = r
self.MatabiauButton.layer.anchorPoint = CGPoint(x: 1, y: 0.5)
self.MatabiauButton.transform = CGAffineTransform(scaleX: 0, y: 1)
UIView.animate(withDuration: 0.5, delay: 0.3, options: [], animations: {
self.MatabiauButton.transform = CGAffineTransform(scaleX: 1, y: 1)
}, completion: nil)
}
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