I have a viewcontroller with a custom view area on the top, as seen in the below image
I want to load a custom xib into this area and I am struggling to do so.
I created a ABC.swift
file which is a subclass of NSView and a .xib file with the same name.
In the .xib file from the identity inspector I set the class ABC.
Then in my viewcontroller's viewDidLoad()
I try to do the following
let abcView = Bundle.main.loadNibNamed("ABC", owner: self, topLevelObjects: nil) as ABC
I also created an outlet for the custom view in my vc
then in viewDidLoad()
customView.addSubview(abcView)
But this not working as abcView is of type Bool. Can anyone tell me what am I doing wrong? What is the best way to achieve my goal?