IBInspectable properties not showing in XCode 8.3.3
I am new to xcode development and while trying to modify the Apple tutorial I found it here in IBinspectable properties for my own project. I ran into a major roadblock.
I have defined a simple button subclass:
import UIKit
@IBDesignable public class SocialMediaLoginButton: UIButton {
private var _loginType: SocialMediaLoginType = .facebook
@IBInspectable public var loginType: SocialMediaLoginType
= SocialMediaLoginType.facebook {
didSet {
self._loginType = loginType
}
}
}
Then added the UIButton to my storyboard, after which I selected CustomClass as the above type. When I go to the attribute inspector, the property doesn't work for me. I have no idea what's going on:
I looked at other questions, however they are either extremely out of date or have no answers on the app developers forum.
I tried:
- Manually update views
- closing and reopening xcode
- removing and re-adding a control
- adding different controls like UIView and trying to accomplish the same thing.
None of them worked. I don't understand how to fix this. I am using Xcode 8.3.3
+3
user4592495
source
to share