Initializer for conditional binding must have Optional type, not '() -> String?
How to treat this error?
func loadViewFromNib() -> UIView? {
let xibName = getXibName()
let bundle = Bundle(for: type(of: self))
let nib = UINib(nibName: xibName!, bundle: bundle)
return nib.instantiate(
withOwner: self,
options: nil).first as? UIView
}
func getXibName() -> String? {
return nil
}

