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