Xcode 16 @IBInspectable properties not showing in the xib file
Asked Answered
N

1

6

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.

Novia answered 18/9, 2024 at 13:31 Comment(0)
B
6

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.

Begrime answered 18/9, 2024 at 14:52 Comment(3)
Thank you, for your answer. For anyone who also didn't read the release notes. Here is the link to the documentation site that mentions this change. developer.apple.com/documentation/xcode-release-notes/…Novia
This is frustrating because even though the previews never worked, it was a good way to prevent mistakes/typos as an alternative to manually entering User Defined Runtime AttributesCloe
Nice of them to remove a feature they couldn't fix. Or couldn't be bothered fixing... Even if they just listed them similarly to the User Defined Runtime Attributes - but with a blank if not enteredDiseur

© 2022 - 2025 — McMap. All rights reserved.