Home > Mobile >  Xib variables defined to nil
Xib variables defined to nil

Time:09-25

Everybody is good, the HTML code is as follows, why to nil, must in the viewDidLoad initialization can first?

@ IBOutlet weak var nickname: UILabel!

Func setModel () {
Nickname. Text="hello"//here will be submitted to the fault of nil, will not be an error in viewDidLoad, must in the viewDidLoad initialized first?
}
  •  Tags:  
  • iOS
  • Related