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

Instance property "appearance" is not public #179

Closed
zeusent opened this issue May 6, 2016 · 7 comments
Closed

Instance property "appearance" is not public #179

zeusent opened this issue May 6, 2016 · 7 comments

Comments

@zeusent
Copy link
Contributor

zeusent commented May 6, 2016

The new appearance variable is not public, thus making the need to explicitly set it on init instead of giving the option to later change it. Is that on purpose?

I would have expected to be able to do something like this

let alertView = SCLAlertView()
alertView.appearance.showCloseButton = false

But that doesn't work and instead I have to do this:

let alertView = SCLAlertView(appearance: SCLAlertView.SCLAppearance(showCloseButton: false))

which feels cumbersome.

@vikmeup
Copy link
Owner

vikmeup commented May 7, 2016

SCLAlertView.SCLAppearance is exposed for use. Current implementation render that have set to appearance property.

let appearance = SCLAlertView.SCLAppearance(
    showCloseButton: false
)
let alertView = SCLAlertView(appearance: appearance)
alertView.showSuccess("No button", subTitle: "You will have hard times trying to close me")

That's the right way to use it.

@vikmeup vikmeup closed this as completed May 7, 2016
@d4kr
Copy link

d4kr commented May 23, 2016

Hi, with SCLAlertView 0.5.6 implemented with cocoapods 1.0 the code

let appearance = SCLAlertView.SCLAppearance( showCloseButton: false )

give me the following error

Type SCLAlertView has no member SCLAppearance

Any idea why?

thx, dk

@vikmeup
Copy link
Owner

vikmeup commented May 23, 2016

@d4kr can you try it again? let me know

@ossmalpha
Copy link

It is not working, I'm getting the same error saying that there is no member SCLAppearance. I checked the .swift file for SCLAlertView pod and I can see public struct SCLAppearance, but, for some reason, this is not recognised in my project classes.

@ossmalpha
Copy link

@vikmeup And I tried reinstalling the pod, cleaning the project, relaunching Xcode, restarting my Mac and all the other tricks, but no result. :/

@vikmeup
Copy link
Owner

vikmeup commented Jun 6, 2016

@ossmalpha have you tried Example Project?

@devJoshLopez
Copy link

anyone able to fix the Type SCLAlertView has no member SCLAppearance error? I just started getting it now too in a new project.

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

5 participants