I\'m running Xcode 6.1 and I have been using IB_DESIGNABLE with IBInspectable for quite a few projects already but all of the sudden it just doesn\'t work anymore. I have create
Try changing your "CGFloat
" declaration for spacingBetweenLabelAndImage
into "NSNumber
".
As far as I know, you can't call "setValue:" on a C-type variable.
Changing the declaration of "spacingBetwenLabelAndImage
" to NSNumber would also require you to change a bit of code too:
CGFloat halfSpacing = self.spacingBetweenLabelAndImage == 0 ? 0 : self.spacingBetweenLabelAndImage / 2;
might become something like:
CGFloat halfSpacing = (self.spacingBetweenLabelAndImage ? ([self.spacingBetweenLabelAndImage floatValue] / 2) : 0.0);
(I'm not 100% certain if this is a perfect translation of the first line, but I wanted to show how to get a floatValue out of a NSNumber)