iosxcodeibinspectablexcode16

Xcode 16 @IBInspectable properties not showing in the xib file


After updating to the latest version of the Xcode IBInspectable properties not showing up in the xib editor. You can see in the screenshots below that inspectable properties added both as extension and as properties for the specific class, both of them are not showing up in the xib file while editing.

inspectable properties code xib file. I was expecting that testCornerRadius inspectable property would be present in the xib file.


Solution

  • Everything having to do with compiling storyboards in Xcode by way of Objective-C has been removed. That includes the old Xcode previews (not to be confused with SwiftUI previews), prepareForInterfaceBuilder, @IBDesignable, and @IBInspectable. This stuff never worked very well and led to crashes.

    As was always the case, you can achieve exactly the same effect as IBInspectable by using the User Defined Runtime Attributes.