@IBDesignable error: IB Designables: Failed to update auto layout status: Interface Builder Cocoa Touch Tool crashed

前端 未结 22 2028
终归单人心
终归单人心 2020-12-02 04:45

I have a very simple subclass of UITextView that adds the "Placeholder" functionality that you can find native to the Text Field object. Here is my code for the su

相关标签:
22条回答
  • 2020-12-02 05:10

    Actually if you have some old user defined attributes (which is not valid for current view) at any view in your storyboard, that may cause your agent to crash.

    Besides, sometimes it happens just because of a nasty bug of Xcode. To check it out, when you're at storyboard uncheck Editor > Automatically Refresh Views, then move to another file, clean and restart your project. After you entered storyboard again, you can click Editor > Refresh Views and check automatic one again. That one also solved my problem once.

    If both didn't work, then probably you have done something wrong about your IBDesignable view, so choose your crashed views in storyboard and debug by clicking Editor > Debug Views

    0 讨论(0)
  • 2020-12-02 05:12

    In my case it was somehow related to a carthage framework that I was using. I had to add $(PROJECT_DIR)/Carthage/Build/iOS to the Runpath Search Paths build setting

    0 讨论(0)
  • 2020-12-02 05:13

    Add this script at the end of my Podfile and performed pod install again.

    post_install do |installer|
        installer.pods_project.build_configurations.each do |config|
            config.build_settings.delete('CODE_SIGNING_ALLOWED')
            config.build_settings.delete('CODE_SIGNING_REQUIRED')
        end
    end
    
    0 讨论(0)
  • 2020-12-02 05:14

    A major issue is when you are creating @IBDesignable make sure the cocoapod file isn't included in the UITests or else it will cause this crash.

    0 讨论(0)
  • 2020-12-02 05:15

    I find the reason is your xib is not the same size as the design in storyboard. Make sure the xib has the same height and width.

    0 讨论(0)
  • 2020-12-02 05:16

    There are crash reports generated when Interface Builder Cocoa Touch Tool crashes. Theses are located in ~/Library/Logs/DiagnosticReports and named IBDesignablesAgentCocoaTouch_*.crash. In my case they contained a useful stack-trace that identified the issue in my code.

    0 讨论(0)
提交回复
热议问题