Extensions.swift

extension UITextField { convenience init( placeholder: String, keyboardType: UIKeyboardType = .default, isSecureTextEntry: Bool = false) { self.init() self.placeholder = placeholder self.keyboardType = keyboardType self.isSecureTextEntry = isSecureTextEntry } } extension UIButton { convenience init( type: UIButtonType = .system, title: String?, image: UIImage?) { self.init(type: type) self.setTitle(title, for: .normal) self.setImage(image, for: .normal) } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.