This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension CustomStringConvertible { | |
var description: String { | |
var desc = "Class Name: \(type(of: self))\n" | |
let mirror = Mirror(reflecting: self) | |
for child in mirror.children { | |
if let label = child.label { | |
desc.append("\(label): \(child.value)\n") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension CustomView { | |
func setupViewParentTextField() { | |
self.addSubview(self.parentTextField) | |
self.parentTextField.snp.makeConstraints { (maker) in | |
maker.center.equalToSuperview() | |
maker.leading.equalToSuperview().offset(16) | |
maker.trailing.equalToSuperview().offset(-16) | |
maker.height.equalTo(50) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomView: UIView { | |
var floatingText: String = "" { | |
didSet { | |
self.floatingLabel.text = floatingText | |
} | |
} | |
var placeHolder: String = "" { | |
didSet { |