Last active
April 26, 2017 10:37
-
-
Save ConorBrady/729bd17871dfa6054763204be1ea49e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MyClass: UIView { | |
let tableView: UITableView | |
let textField: UITextField | |
let buttonOne: UIButton | |
let buttonTwo: UIButton | |
init() { | |
tableView = UITableView(frame: .zero, style: .plain) | |
tableView.backgroundColor = .clear | |
tableView.separatorStyle = .none | |
tableView.contentInset = UIEdgeInsets(top: 15, left: 0, bottom: 15, right: 0) | |
tableView.register(TableCell.self, forCellReuseIdentifier: "TableCell") | |
textField = UITextField() | |
textField.placeholder = "Placeholder" | |
textField.borderStyle = .none | |
textField.backgroundColor = .white | |
textField.returnKeyType = .send | |
textField.rightViewMode = .always | |
textField.leftViewMode = .always | |
button = UIButton() | |
button.setImage(UIImage(named: "ButtonOne"), for: .normal) | |
button.contentMode = .center | |
button.frame = CGRect(x: 0.0, y: 0.0, width: 35, height: 25) | |
button.layer.shadowOpacity = 0.2 | |
button.layer.shadowOffset = CGSize(width: 0, height: 2) | |
button.layer.shadowRadius = 2 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment