Skyscanner / SkyFloatingLabelTextField

A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.
Apache License 2.0
4.09k stars 540 forks source link

Problem with title and selectedTitle properties in Storyboard #314

Open rlaurb opened 4 years ago

rlaurb commented 4 years ago

Report

What did you do?

Added a SkyFloatingTextField to a storyboard. Specified a non-nil value for either/both the 'title' attribute or the 'selectedTitle' attribute.

What did you expect to happen?

The storyboard would compile without error or warning.

What happened instead?

file:///Users/rlaurb/Projects/MorningSugar/MorningSugar/Base.lproj/Main. storyboard: warning: IB Designables: Ignoring user defined runtime attribute for key path "title" on instance of "UITextField". Hit an exception when attempting to set its value: [<UITextField 0x7f910e81b000> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key title.

Environment

MacOS 10.15.4, Xcode 11.4 doing iOS development with storyboards.

Xcode Version: 11.4 SkyFloatingLabelTextField Version: 3.8.0 Deployment Target: iOS 13.0+ Base SDK: iOA 13.4 Method of Integration: SwiftPM

Project that demonstrates the issue

From my research, I think the problem is that these fields have type String? but are not overrides of existing Obj-C properties. I.e., IB seems to have problems with Swift Optionals that are not backed with Objc objects.