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

Alpha recursion #3

Open
SteffeyDev opened this issue Dec 17, 2015 · 0 comments
Open

Alpha recursion #3

SteffeyDev opened this issue Dec 17, 2015 · 0 comments

Comments

@SteffeyDev
Copy link

For the get and set methods of the variables, you cannot set a variable in it's "set" method or return a variable in its own "get" method, or else you get recursion. For variables such as style, you need to do something like

private var _style: RZVibrantButtonStyle!
public var style:RZVibrantButtonStyle{
get {
if self._style == nil {
self._style = RZVibrantButtonStyle.Invert
}
return self._style
}
set{
self._style = newValue
...

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

1 participant