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

convenience init() across the framework prevents generic initialization of the components #1085

Closed
OrkhanAlikhanov opened this issue Jun 4, 2018 · 2 comments

Comments

@OrkhanAlikhanov
Copy link
Contributor

All of the following convenience initializers that are defined for UIView subclasses are redundant.

public convenience init() {
  self.init(frame: .zero)
}

With or without it, we can create object of UIView and its subclasses. Adding it actually causes a problem for their use in generic initialization
For example TextField().

image

@daniel-jonathan
Copy link
Member

Let's remove them. Great find.

@daniel-jonathan
Copy link
Member

I merged in the PR. I will close this now. Thank you!

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

No branches or pull requests

2 participants