Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminating with uncaught exception of type NSException #1

Open
backter opened this issue Dec 18, 2017 · 0 comments
Open

terminating with uncaught exception of type NSException #1

backter opened this issue Dec 18, 2017 · 0 comments

Comments

@backter
Copy link

backter commented Dec 18, 2017

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

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant