IBDesignable View Rendering times out

后端 未结 5 2028
离开以前
离开以前 2020-12-14 16:26

I\'ve been working on an app on and off for a few months starting with the first XCode 6/iOS 8 beta release. One of my favorite features added is live rendering, made possib

5条回答
  •  长情又很酷
    2020-12-14 17:14

    For me, this error turned out to be due to a blocking call to a sqlite database (using CoreData) in one of my @IBInspectable properties.

    My code originally queried the database and then used dispatchAsync to set the value of a label based on the results of the query. I changed it so that the query was also launched in the dispatchAsync block. The error immediately went away.

    If anyone else is having trouble with this error, I suggest checking out any code that would be executed during the design phase (constructors or computed properties marked with @IBInspetable). If there is any blocking code (network operations, database access, etc.), it might be causing the timeout error. Hope this helps.

提交回复
热议问题