@IBDesignable crashing agent

前端 未结 10 920
自闭症患者
自闭症患者 2020-11-29 02:59

When I write my own UIButton-extended class and make it @IBDesignable, I receive two errors in Interface Builder, namely:

  • Main.storyb
10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 03:37

    I've met the same problem and solved it this way:

    1. The Problem:

    error: IB Designables: Failed to update auto layout status: The agent crashed

    1. Find the debug button in the inspection file and click it.

    debug

    1. Then the Xcode will tell you where the prolem is. In my case I drop the IBDesignable before the class.

    2. Then I clean and rebuild it, the error disappeared

提交回复
热议问题