Suppose i have a ABC : UIViewController
. I would like to make it a Singleton class, as this view can be launched from various places in my app.
I started coding as below, but not sure how to proceed:
public static sharedInstance
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}