Git Product home page Git Product logo

hokusai's People

Contributors

craftedbymax avatar gkaimakas avatar nnsnodnb avatar pittan avatar ytakzk 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hokusai's Issues

Fix for cancel button title

line 351
// Add a cancel button
self.addCancelButton("Done") ///here

    // Decide the menu size

should be
self.addCancelButton(cancelButtonTitle)

Swift Compiler Error after updating to Swift 4

I've encountered some compiler error after upgrading to Swift 4.
Xcode Version 9.1

Pods/Hokusai/Classes/Hokusai.swift:186:65: Argument of '#selector' refers to instance method 'tick' that is not exposed to Objective-C

Pods/Hokusai/Classes/Hokusai.swift:285:64: Argument of '#selector' refers to instance method 'onOrientationChange' that is not exposed to Objective-C

/Pods/Hokusai/Classes/Hokusai.swift:353:36: Argument of '#selector' refers to instance method 'buttonTapped' that is not exposed to Objective-C

And counting...How can fix this?

Thanks in advance

HOKColors' cannot be constructed because it has no accessible: initializers

Hi, I tried this simple code:

       let hokusai = Hokusai()

        // Add a button with a closure
        hokusai.addButton("Button 1") {
            println("Rikyu")
        }

        // Add a button with a selector
        hokusai.addButton("Button 2", target: self, selector: Selector("button2Pressed"))

        // Set a font name. AvenirNext-DemiBold is the default. (Optional)
        hokusai.fontName = "Verdana-Bold"

        // Select a color scheme. Just below you can see the dafault sets of schemes. (Optional)
        hokusai.colorScheme = HOKColorScheme.Karasu

        hokusai.colors = HOKColors(
            backGroundColor: UIColor.blackColor(),
            buttonColor: UIColor.purpleColor(),
            cancelButtonColor: UIColor.grayColor(),
            fontColor: UIColor.whiteColor()
        )

        // Show Hokusai
        hokusai.show()

        // Selector for button 2
        func button2Pressed() {
            println("Oribe")
        }

        // Change a title for cancel button. Default is Cancel. (Optional)
        hokusai.cancelButtonTitle = "Done"

        // Add a callback for cancel button (Optional)
        hokusai.cancelButtonAction = {
            println("canceled")
        }

but i have this error, do you had never seen it before?

HOKColors' cannot be constructed because it has no accessible: initializers

Fix for rotation issue

There is an issue to the rotation Portrait -> Landscape
To recreate the problem:
Launch the app in portrait. do not rotate
Open the menu when the device is still vertically
Rotate the device

  • the shapeLayer.fillColor is drew with portrait dimensions ("background" half coloured, half transparent)

My fix
menuView. shapeLayer. frame = frame menuView.
menuView. shapeLayer. bounds. origin = origin menuView. frame.
menuView. updatePath () //ADD THIS LINE
menuView. shapeLayer. layoutIfNeeded ()
menuView. layoutIfNeeded ()

I don't know if it's the right time to call menuView.updatePath()
Perhaps it would be better to call it somewhere else or change something else

On Rotation issue

Hello, I have just used your library. It looks very convenient and great. But I found out, there is an issue, if I rotate a phone, menu will not adjust properly.

Hokusai.swift pulled from Cocoapods differs from Hokusai.swift in Github repo

Swift Compiler Error after updating to Swift:
"Argument of '#selector' refers to instance method 'tick' that is not exposed to Objective-C"

Based on my research, adding @objc would expose these instance methods to Objective-C and I see that in the Hokusai.swift file of your latest Hokusai version (0.4.0) on Github you have those @objc attributes. However, when I install the latest Hokusai pod via Cocoapods, I do not see these attributes in the Hokusai file.

Not sure why the Hokusai.swift pulled from Cocoapods differs from the Hokusai.swift here in the repo (the 6 missing @objc attributes seem to be the only difference). For example, in the Hokusai.swift file of the latest master branch, it correctly shows the attribute for example:
@objc func tick(_ displayLink: CADisplayLink)
But in the Hokusai.swift file in my Xcode project, I do not see this @objc attribute, even though I installed the latest Hokusai (0.4.0) (via pod Hokusai in my Podfile).
@ytakzk

Issue!!

I have added Hokusai.show on a button Action and the problem that i have observed is that a cancel button gets added when ever I click on my Added button.Please suggest if this is an issue or implementation fault.

I some how managed to resolve the issue too but I did that by manipulating a line of code in your class Hokusai.swift. Where i commented the code as follow:

// Add a cancel button
// self.addCancelButton(cancelButtonTitle)

Pop down from top of screen

Hello!

Love your pod, super easy to implement! Only issue i'm having is that it's slightly hard to customize!

What I am trying to do is make it so that instead of animating up from the bottom of the screen, it animates down form the top of the screen. I've been trying for a couple days now on and off, but if this is something that would be an easy tweak, please let me know!

Thanks!

Title Text and Description

Hello how can I add a title text and description for better user experience and also to match the original action sheet from Apple. :)

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.