i try to load a custom uiview from a nib by calling instantiateWithOwner
func loadViewFromNib() -> UIView {
let bundle = NSBundle(forClass: self.dynamicType)
let nib = UINib(nibName: "myCustomView", bundle: bundle)
let view = nib.instantiateWithOwner(self, options: nil)[0] as! UIView
return view
}
the view is loading successfully but it long time to load (5 seconds). when i traced the code i found that the reason of delaying in this line :
let view = nib.instantiateWithOwner(self, options: nil)[0] as! UIView
i removed all autolayout constraints but it still delay in calling