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

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

Closed
enricopiovesan opened this issue Aug 29, 2015 · 4 comments

Comments

@enricopiovesan
Copy link

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

@ytakzk
Copy link
Owner

ytakzk commented Aug 29, 2015

@enricopiovesan Which Xcode are you using?

@enricopiovesan
Copy link
Author

6.4

@ytakzk
Copy link
Owner

ytakzk commented Sep 26, 2015

I have updated Hokusai to be compatible with Swift2.0.
Do you still see the same issue now?

@ytakzk ytakzk closed this as completed in 5729fbf Sep 26, 2015
@ytakzk
Copy link
Owner

ytakzk commented Sep 26, 2015

I found the reason why you see the message. I already fixed the codes not to cause the error.
Thank you!

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

2 participants