I noticed that IBDesignable was deprecated in the Xcode 16 release notes, and IBInspectable was deprecated in the Xcode 16.1 release notes.
So, I performed some tests on IBDesignable and IBInspectable in Xcode. I wrote the following code:
@IBDesignable
extension UIView {
@IBInspectable var cornerRadius: CGFloat {
get {
layer.cornerRadius
}
set {
layer.cornerRadius = newValue
}
}
@IBInspectable var borderWidth: CGFloat {
get {
layer.borderWidth
}
set {
layer.borderWidth = newValue
}
}
@IBInspectable var borderColor: UIColor {
get {
UIColor(cgColor: layer.borderColor ?? .init(red: 1, green: 1, blue: 1, alpha: 0))
}
set {
layer.borderColor = newValue.cgColor
}
}
}
I cannot access the IBInspectable property in Xcode 16.
However, I can access the IBInspectable property in Xcode 16.1 and Xcode 16.2 Beta, where the Interface Builder shows it in the Attributes Inspector.
Is it possible that this will be updated later, as it differs from the release notes? Thank you.