3

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 thisStoryboard Error

At present my storyboard looks like this Storyboard

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?

niravdesai21
  • 4,818
  • 3
  • 22
  • 33

4 Answers4

2
  • Quit Xcode
  • Delete derived data
  • Start Xcode again
  • Hopefully, this will solve your problem
Ashish Chauhan
  • 1,316
  • 15
  • 22
  • I did this, it didn't work, then I restarted my computer and things were back to how they should be. Thank you! – agrippa Sep 06 '19 at 15:30
1

Try to change device in storyboard, hope it will be shown again. I had faced the same issue before. I switched to another device and it was appeared as before, then i switch back to iPhone 8.

Your crash has generated due to, most probable you have deleted iOS DeviceSupport and iOS Device Logs, it will be fine, just close app and xcode, turn off the system completely and try again. Hope it may fix your crash.

enter image description here

Abhishek Mitra
  • 3,335
  • 4
  • 25
  • 46
  • I changed the device but still same, but I am noticing xcode goes not responding everytime i open storyboard or make change like this you mentioned above. – niravdesai21 Dec 12 '17 at 09:24
  • @niravdesai21does your xcode storyboard respond very slow or xcode become not responding everytime when you select the storyboard? – Abhishek Mitra Dec 12 '17 at 09:40
  • @ AbhishekMitra Yes – niravdesai21 Dec 12 '17 at 09:43
  • @niravdesai21 well then select storyboard and wait until it is open fully. then select iPhone X and wait again. it may takes 15 min more or less according to your system performance. – Abhishek Mitra Dec 12 '17 at 10:02
  • No bro still no help, i changed device from IPhone 8 Plus to IPhone 8. I also checked same on Xcode 8 storyboard opens fine But on Xcode 9.2 It doesn't. – niravdesai21 Dec 12 '17 at 10:19
  • Well, I can give you one suggestion, You must have xcode 8 in other machine and xcode 9.2 in other machine. then in scode 8 machine change your build version and zip that project, In that mean time xcode 9.2 machine, delete the whole project. from recycle bin too. now open that zip project in your 9.2's machine. and check. I did face that same, but i did above and it was worked. Thanks – Abhishek Mitra Dec 12 '17 at 10:23
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/161007/discussion-between-niravdesai21-and-abhishek-mitra). – niravdesai21 Dec 12 '17 at 10:24
-1

To remove the blue lines,

In Xcode, Go to Editor > Canvas > Show Bounds Rectangles

This will hide the blue lines

Image Link

Bhavi Lad
  • 237
  • 2
  • 7
-1

Close and Restart your xcode it will work fine. if issue will be there then restart the mac.

Note Always split your storyboard after max 10 controllers in it. Create new storyboards and link them

junaidsidhu
  • 3,539
  • 1
  • 27
  • 49
  • Read the question completely. He already tried that. "I tried deleting derived data, restarted Xcode, but didn't solve." – Lal Krishna Dec 12 '17 at 08:42