Guest User

Untitled

a guest
Jun 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public protocol SimpleViewControllerDelegate: class {
  2. func simpleViewControllerAction(_ viewController: SimpleViewController)
  3. }
  4.  
  5. public final class SimpleViewController {
  6.  
  7. // MARK: - Public Properties
  8.  
  9. public weak var delegate: SimpleViewControllerDelegate? = nil
  10.  
  11. // MARK: - Initialization
  12.  
  13. public convenience init(delegate: SimpleViewControllerDelegate) {
  14. self.init()
  15. self.delegate = delegate
  16. }
  17.  
  18. // MARK: - IBActions
  19.  
  20. @IBAction func action() {
  21. self.delegate?.simpleViewControllerAction(self)
  22. }
  23.  
  24. }
Add Comment
Please, Sign In to add comment