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

View: convenience init() should not call prepare() again. #965

Closed
cuongtv51 opened this issue Nov 14, 2017 · 7 comments
Closed

View: convenience init() should not call prepare() again. #965

cuongtv51 opened this issue Nov 14, 2017 · 7 comments

Comments

@cuongtv51
Copy link

View.swift line 162 , i suggest convenience init should not call prepare() again

@OrkhanAlikhanov
Copy link
Contributor

That's correct, and I think there is no need to declare convenience init(). It should work without.

/// Convenience initializer.
public convenience init() {
self.init(frame: .zero)
prepare()
}

@daniel-jonathan
Copy link
Member

Thank you, that is correct. There was an extra call. It will be posted in the next release, later today.

@cuongtv51
Copy link
Author

Thanks for quick response, i just try to use your framework, thanks for your great work.

@daniel-jonathan
Copy link
Member

It's a pleasure :)

@cuongtv51
Copy link
Author

I have search all convenience method and checking , i found another place in Button.swift also duplicate prepare() function call.

@daniel-jonathan
Copy link
Member

daniel-jonathan commented Nov 15, 2017

@cuongtv51 excellent, I will take a look :)

@daniel-jonathan
Copy link
Member

Please find a fix for this in Material 2.12.16 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants