-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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()
}
}
Metadata
Metadata
Assignees
Labels
No labels