Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CustomClass.Swift
- @IBOutlet weak var barLbl: UILabel!
- @IBDesignable class CustomControl: UIView {
- @IBInspectable var lblSetGetName : String! {
- set{barLbl.text = newValue}
- get{return barLbl.text}
- }
- class ViewController: UIViewController {
- override func viewDidLoad() {
- super.viewDidLoad()
- let CustomControlObj : CustomControl!
- var lblName = CustomControlObj.lblSetGetName
- CustomControlObj.lblSetGetName = "New Txt"
- }
- let customControlObj = (Bundle.main.loadNibNamed("CustomView", owner: self, options: nil))?[0] as! CustomControl
Add Comment
Please, Sign In to add comment