I have a custom class that uses UIView or NSObject etc.. and I override the init, however I want to be able to pass a custom parameter to this class when it initializes, but I can't figure out how to do that. Any ideas?
class SettingLauncher: NSObject, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
override init(controller: UIViewController){
// cant pass this as a param, causes error
super.init()
}
}
What I want to be able to do is
let settingsLauncher = SettingLauncher(controller: self)