Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // ViewController.swift
- // TableViewNotification
- //
- // Created by Mihai Muntean on 18/07/2019.
- // Copyright © 2019 Mihai Muntean. All rights reserved.
- //
- import UIKit
- class ViewController: UIViewController, CustomViewProtocol {
- func but2pressed(indexPath: IndexPath) {
- label.text="The cell that was pressed is found at \(indexPath)"
- }
- @IBOutlet weak var label: UILabel!
- var customView: CustomView!
- override func viewDidLoad() {
- super.viewDidLoad()
- createCustomView()
- }
- func createCustomView() {
- customView = CustomView(frame: CGRect(x: 20.0, y: 180.0, width: view.frame.width/2.0, height: view.frame.height / 2.0))
- customView.delegate = self
- view.addSubview(customView)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement