making line view public so that it can be hide/show on demand#85
making line view public so that it can be hide/show on demand#85jamshaidazeem wants to merge 1 commit intojobandtalent:masterfrom jamshaidazeem:master
Conversation
victorBaro
left a comment
There was a problem hiding this comment.
Thank you for submitting a PR.
Please take a look at my comment. I would be happy to merge once it is fixed.
| } | ||
|
|
||
| fileprivate let lineView = AnimatedLine() | ||
| public let lineView = AnimatedLine() |
There was a problem hiding this comment.
Although this works, I would prefer having 2 new methods than making the line public. Something like:
func hideLine(animated: Bool)
Internally this would either call isHidden or fillLine(with: UIColor.clear).
func showLine(animated: Bool)
Internally this would either call isHidden = false or fillLine(with: style.lineColor)
| } | ||
|
|
||
| fileprivate let lineView = AnimatedLine() | ||
| public let lineView = AnimatedLine() |
There was a problem hiding this comment.
can't be this solve just by making an open var?? e.g.
open var lineViewHidden: Bool = false {
didSet {
if lineViewHidden {
lineView.fillLine(with: UIColor.clear)
} else {
lineView.fillLine(with: style.lineActiveColor)
}
}
}There was a problem hiding this comment.
Sure, that will work as well.
My concern about making lineView public was that we would be exposing implementation details that should be private.
No description provided.