Guest User

Untitled

a guest
Jul 18th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. CustomClass.Swift
  2.  
  3. @IBOutlet weak var barLbl: UILabel!
  4. @IBDesignable class CustomControl: UIView {
  5. @IBInspectable var lblSetGetName : String! {
  6. set{barLbl.text = newValue}
  7. get{return barLbl.text}
  8. }
  9.  
  10. class ViewController: UIViewController {
  11.  
  12. override func viewDidLoad() {
  13. super.viewDidLoad()
  14. let CustomControlObj : CustomControl!
  15.  
  16. var lblName = CustomControlObj.lblSetGetName
  17. CustomControlObj.lblSetGetName = "New Txt"
  18. }
  19.  
  20. let customControlObj = (Bundle.main.loadNibNamed("CustomView", owner: self, options: nil))?[0] as! CustomControl
Add Comment
Please, Sign In to add comment