Skip to content

terminating with uncaught exception of type NSException #1

Description

@backter

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()
}

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions