2017年9月15日 星期五

Class has no initializers in swift

Class has no initializers in swift

I have met this situation.

Found a solution here

It says if you have the code like bellow

var searchController: UISearchController
 
 
You need to change to 
 
var searchController: UISearchController!
or
 
use optional to avoid it crash.
 
var searchController: UISearchController?
 
   

沒有留言:

Class has no initializers in swift

Class has no initializers in swift I have met this situation. Found a solution here It says if you have the code like bellow var se...