NotchToolkit icon indicating copy to clipboard operation
NotchToolkit copied to clipboard

terminating with uncaught exception of type NSException

Open backter opened this issue 7 years ago • 0 comments

Hello i'm first use Third-party libraries i have a error

// // ViewController.swift

import UIKit import NotchToolkit class ViewController: UIViewController,NotchToolbarDelegate { let toolbar = NotchToolbar () func deviceDidRotate() { toolbar.autoResize() }

func didTapToolIcon(_ tools: UICollectionView, toolIndex: IndexPath, section: Int, row: Int) {
    if row == 0 {
        print("first icon")
    }else if row == 1 {
        print("second icon")
    }
}
override func viewDidLoad() {
    super.viewDidLoad()
    toolbar.notch.isVisible = true
    
    toolbar.notch.height = 250
    
    toolbar.toolList = [
        //[icon image, title]
        [UIImage(named:"pikachusquare")!, "Pikachu"],
        //only image icons
        UIImage(named:"spongebob")!,
        //only string icons (mainly for emojis 😉)
        "🤔", "🤓",
        "📱", "👩‍💻",
        "👨‍💻", "✅", "🔥"]
    
    toolbar.delegate = self
    toolbar.initializeToolbar(self)
    
    // Do any additional setup after loading the view, typically from a nib.
}




@IBAction func Click(_ sender: UIButton) {
    if toolbar.notch.isVisible {
        sender.setTitle("Show Notch Toolbar", for: .normal)
    }else{
        sender.setTitle("Hide Notch Toolbar", for: .normal)
    }
    toolbar.showOrHide()
}

}

backter avatar Dec 18 '17 02:12 backter