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

Removed unnecessary convenience initializers. #1088

Merged
merged 1 commit into from
Jun 6, 2018
Merged

Removed unnecessary convenience initializers. #1088

merged 1 commit into from
Jun 6, 2018

Conversation

OrkhanAlikhanov
Copy link
Contributor

@OrkhanAlikhanov OrkhanAlikhanov commented Jun 5, 2018

#1085
Removed all redundant convenience initializer:

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

Only kept in TextView because it has some logic there:

/// A convenience initializer that constructs all aspects of the textView.
public convenience init() {
let textContainer = NSTextContainer(size: .zero)
let layoutManager = NSLayoutManager()
layoutManager.addTextContainer(textContainer)
let textStorage = TextStorage()
textStorage.addLayoutManager(layoutManager)
self.init(textContainer: textContainer)
textContainer.size = bounds.size
textStorage.delegate = self
}

@daniel-jonathan daniel-jonathan merged commit 25a3dec into CosmicMind:development Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants