Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public protocol SimpleViewControllerDelegate: class {
- func simpleViewControllerAction(_ viewController: SimpleViewController)
- }
- public final class SimpleViewController {
- // MARK: - Public Properties
- public weak var delegate: SimpleViewControllerDelegate? = nil
- // MARK: - Initialization
- public convenience init(delegate: SimpleViewControllerDelegate) {
- self.init()
- self.delegate = delegate
- }
- // MARK: - IBActions
- @IBAction func action() {
- self.delegate?.simpleViewControllerAction(self)
- }
- }
Add Comment
Please, Sign In to add comment