View UIAlertController+Extension.swift
This file contains 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
// Extension | |
extension UIAlertController { | |
convenience init(with error: Error) { | |
var title: String! | |
var message: String! | |
if let error = error as? LocalizedError, let errorDescription = error.errorDescription { | |
title = errorDescription |
View UIView+Extension.swift
This file contains 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 | |
// Extension | |
extension UIView { | |
func motionEffect(intensity: Int) { | |
// Set vertical effect | |
let verticalMotionEffect = UIInterpolatingMotionEffect(keyPath: "center.y", type: .tiltAlongVerticalAxis) | |
verticalMotionEffect.minimumRelativeValue = -intensity |
View InterpolatingMotionEffect.swift
This file contains 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 InterpolatingMotionEffect: UIViewController { | |
@IBOutlet var exampleView: UIImageView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
View UIViewController+Extension.swift
This file contains 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 | |
// Extension | |
extension UIViewController { | |
func presentShareSheet(for object: Object) { | |
guard let text = object.text, | |
let image = object.image, | |
let url = object.url else { | |
return |
View RaceViewController.swift
This file contains 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 | |
// MARK: RaceViewController | |
class RaceViewController: UIViewController { | |
// MARK: Outlets | |
@IBOutlet weak var raceButton: UIButton! | |
@IBOutlet weak var raceView: UIView! |
View TestViewController.swift
This file contains 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 | |
// MARK: TestViewController | |
class TestViewController: UIViewController { | |
// MARK: Outlets | |
@IBOutlet var testView: TestView! |
View TestView.swift
This file contains 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 | |
// MARK: TestViewDelegate | |
protocol TestViewDelegate: class { | |
func testView(_ testView: TestView, didSelect button: UIButton) | |
} | |
// MARK: TestView |
View ImagePickerViewController.swift
This file contains 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 | |
// MARK: ImagePickerViewController | |
class ImagePickerViewController: UIViewController { | |
// MARK: Outlets | |
@IBOutlet var cameraButton: UIButton! | |
@IBOutlet var libraryButton: UIButton! |
View PhotoSliderView.swift
This file contains 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 | |
// MARK: PhotoSliderView | |
class PhotoSliderView: UIView { | |
// MARK: Outlets | |
@IBOutlet var contentView: UIView! | |
@IBOutlet var scrollView: UIScrollView! |
OlderNewer