Giter Site home page Giter Site logo

afathi / notchtoolkit Goto Github PK

View Code? Open in Web Editor NEW
57.0 4.0 3.0 26.9 MB

Use the iPhone X notch in creative ways ๐Ÿ‘ฉโ€๐ŸŽจ๐Ÿ‘จโ€๐ŸŽจ.

License: MIT License

Ruby 0.80% Swift 83.98% Objective-C 2.00% Shell 13.22%
iphone-x swift-4 swift-framework uiview ui design draw toolbar

notchtoolkit's People

Contributors

afathi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

notchtoolkit's Issues

terminating with uncaught exception of type NSException

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

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.