kamisama42
kamisama42

Reputation: 625

IBDesignable drawings not displaying in storyboard

I am having an issue with IBDesignable elements not appearing in the storyboard view. It seems to be particular to my machine/version of Xcode (2015 11" Macbook Air running MacOS 10.14.4 and Xcode 10.2.1) and not an error in the code, as the same project displays fine when run on a 13" Retina (Xcode 9.2). It also displays correctly in the simulator.

I have tried cleaning and rebuilding the project, creating a new project, restarting Xcode, restarting the computer, deleting derived data, and updating to the latest version of Xcode but have had no success.

When I attempt to run Editor > Debug Selected Views, I get the following error: "Could not attach to pid: #### Error 1."

Below is an image showing my IBDesignable class and the resulting storyboard presentation.

storyboard and IBDesignable class

Any help with this would be greatly appreciated!

UPDATE: I also noticed that when I select the designable view, the inspector reads "Designables Updating," as in the image below:

enter image description here

Upvotes: 3

Views: 1904

Answers (3)

A64
A64

Reputation: 1

I stumbled upon this question when I was looking for why all my custom views turned white on the storyboards. It turns out this feature was unfortunately deprecated and removed in Xcode 16: https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes

Upvotes: 0

kamisama42
kamisama42

Reputation: 625

This finally solved my problem: https://stackoverflow.com/a/26720740/5291486

To sum up, I enabled Editor > Automatically Refresh Views and then clicked Editor > Refresh All Views.

Upvotes: 0

Sujan
Sujan

Reputation: 147

Verify if the code in your draw function is correct.

Upvotes: -1

Related Questions