SkyFloatingLabelTextField
SkyFloatingLabelTextField copied to clipboard
Throws error while used in Interfacebuilder
Unknown class _TtC33SkyFloatingLabelTextFieldWithIcon33SkyFloatingLabelTextFieldWithIcon in Interface Builder file.
Hey,
To better understand what's going wrong I need to know how are you integrarting SkyFloatingLabelTextField in your project?
Initially I added by cocoa pods, On doing it not detect the headers
So I downloaded the source file and added inside the project folder.
Now it works for SkyFloatingLabelTextField, and it crashes while using SkyFloatingLabelTextFieldWithIcon.
May I know , what is correct flow of using this class ?
What I'm doing wrong ?
Thanks,
Iniyarajan
When you used CocoaPods did you remember to open <Project>.xcworkspace
after running pod install
instead of opening <Project>.xcproject
? I'd recommend you stick with CocoaPods it'll be simpler for you in the long run.
I see in your screenshot that you now have both pods and the source files integrated which could create problems in itsel. What's the full error when it crashes?
Yes, I used the xcworkspace, But It shows error as below screenshot.After removing the source in project only with cocoa pods.
I don't see an import statement for SkyFloatingLabelTextField in there. If you add
@import SkyFloatingLabelTextField
Does that solve it?
Now, I added and the error as below,
Are you sure you've connected the outlet correctly that looks like the value is nil
. I'd put a breakpoint and verify that the value gets set correctly
Yes, i checked all the outlets are connected correctly.But it works for SkyFloatingLabelTextField, it crashes only while using SkyFloatingLabelTextFieldWithIcon
There are a bunch of other things that could be wrong. Did you specify the module when setting the class in IB for example?
I made a small example project that integrates SkyFloatingLabelTextField using CocoaPods and then connects a SkyFloatingLabelTextFieldWithIcon via IB like you are. TestIssue132.zip
@Iniyarajan did you resolve this?