IBDesignable

Hi, I'm having some trouble getting views that are designated as being @IBDesignable to update when the view relies on CALayer sublayers. I've tried checking the Core Animation layer option in Xcode, but this seems to simply stop any drawing (including the views drawRect). Building and running gives the desired result, but I cannot trick Xcode into drawing the layers. How does one go about getting Xcode to present the view, fully drawn with drawRect and its sublayers?

Replies

That's definitely not a general issue, because I do it all the time. If a CALayer does not display correctly, it's usually an issue related to the placment of the layer. Could you provide a bit more info what you are doing exactly?

Hi, sorry for the slow reply. I've been busy with my thesis, so this project was set aside for a while. I'll get back to you with some more details once the thesis is over 🙂