in objective c it can be done in init method by
-(id)init{
self = [[[NSBundle mainBundle] loadNibNamed:@\"ViewBtnWishList\" owner:0 options:nil] obje
that may be a solution for you:
class func instanceFromNib() -> UIView {
return UINib(nibName: "<>", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! UIView
}
class func instanceFromNib() -> UIView {
return UINib(nibName: "<>", bundle: nil).instantiateWithOwner(nil, options: nil)[0] as UIView
}