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
// | |
// Obfuscator.swift | |
// SwiftObfuscatorExample | |
// | |
// Created by Mathieu White on 2016-07-03. | |
// Copyright © 2016 Mathieu White. All rights reserved. | |
// | |
import Foundation |
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
private extension Selector { | |
static let buttonPressed = #selector(ViewController.buttonPressed(_:)) | |
} | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let button: UIButton = UIButton(type: UIButtonType.Custom) | |
button.addTarget(self, |
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
// | |
// FacebookManager.swift | |
// | |
// Created by Mathieu White on 2016-02-07. | |
// Copyright © 2016 Mathieu White. All rights reserved. | |
// | |
import UIKit | |
import FBSDKCoreKit | |
import FBSDKLoginKit |
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
// | |
// UIImageExtension.swift | |
// | |
// Created by Mathieu White on 2016-02-05. | |
// Copyright © 2016 Mathieu White. All rights reserved. | |
// | |
import UIKit | |
extension UIImage |
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
protocol SomeDelegate: class | |
{ | |
func function() | |
func optionalFunction() | |
} | |
extension SomeDelegate | |
{ | |
func optionalFunction() { print("This will get called if the function isn't implemented") } | |
} |