Skip to content

Instantly share code, notes, and snippets.

@ilteris
Last active August 29, 2015 14:26
Show Gist options
  • Save ilteris/0b3e397260f78cad0a55 to your computer and use it in GitHub Desktop.
Save ilteris/0b3e397260f78cad0a55 to your computer and use it in GitHub Desktop.
class PopupInputBox: UIControl {
let label = UILabel()
var item: Statement = Statement() {
didSet {
setupLabel()
}
}
let tip: UIImageView = {
let view: UIImageView = UIImageView(image: UIImage(named: "polygon"))
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupView()
}
private func setupView() {
}
}
//how I want viewcontroller call to be
questionView.popupInputBox.item = Statement(terms: [Number(value:"28000")]),
class PopupInputBox: UIControl {
let label = UILabel()
var item: String = "" {
didSet {
setupView()
}
}
let tip: UIImageView = {
let view: UIImageView = UIImageView(image: UIImage(named: "polygon"))
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupView()
}
private func setupView() {
}
}
//currently viewcontroller calls
questionView.popupInputBox.item = "28,000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment