Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kostapappas/48fcbfa034b926a2e4cd73db3d5c54f9 to your computer and use it in GitHub Desktop.
Save kostapappas/48fcbfa034b926a2e4cd73db3d5c54f9 to your computer and use it in GitHub Desktop.
Custom ViewController for hotreload
extension ContactUsViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.initializeViews()
}
}
class ContactUsViewController: BaseSearchViewController {
@IBOutlet weak var searchBarTextField: UITextField!
@objc func injected() {
self.initializeViews()
}
var nameTextField = FoodCityTextField(title: "Name",
placeHolder: "Name",
customType: FoodCityGenericTextField.CustomType.nameInput)
deinit {
print("deinit \(String(describing: self)) called")
}
private func initializeViews() {
self.setupViews()
self.setupAutoConstrains()
}
private func setupViews() {
self.view.backgroundColor = .white
self.view.svh([nameTextField])
}
private func setupAutoConstrains() {
nameTextField.width(90%).height(60.ratioPerWidth).centerInContainer()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment