This is in relation to this question, which didn't help me solve my problem, also I checked this ~/Library/Logs/DiagnosticReports
and got IBDesignablesAgentCocoaTouch_*.crash
file, On checking it shows this
At present my storyboard looks like this
I tried deleting derived data, restarted Xcode, but didn't solve.
OS I use is macOS high Sierra
I have noted now whenever I switch from storyboard to another file or change device in storyboard, Xcode becomes (Not Responding), then I will have to Force Quit and restart Xcode again.
Edit : I use this code for status bar appearance
UIApplication.shared().statusBarStyle = .lightContent
UIApplication.shared() .isStatusBarHidden = false
And for @IBDesignable
extension UIView {
class func loadNib<T: UIView>(_ viewType: T.Type) -> T {
let className = String.className(viewType)
return Bundle(for: viewType).loadNibNamed(className, owner: nil, options: nil).first as! T
}
class func loadNib() -> Self {
return loadNib(self)
}
}
@IBDesignable extension UIView {
@IBInspectable var borderColor:UIColor? {
set {
layer.borderColor = newValue!.cgColor
}
get {
if let color = layer.borderColor {
return UIColor(cgColor:color)
}
else {
return nil
}
}
}
@IBInspectable var borderWidth:CGFloat {
set {
layer.borderWidth = newValue
}
get {
return layer.borderWidth
}
}
@IBInspectable var cornerRadius:CGFloat {
set {
layer.cornerRadius = newValue
clipsToBounds = newValue > 0
}
get {
return layer.cornerRadius
}
}
}
Any ideas?