SkyFloatingLabelTextField icon indicating copy to clipboard operation
SkyFloatingLabelTextField copied to clipboard

Throws error while used in Interfacebuilder

Open Iniyarajan opened this issue 7 years ago • 10 comments

Unknown class _TtC33SkyFloatingLabelTextFieldWithIcon33SkyFloatingLabelTextFieldWithIcon in Interface Builder file.

Iniyarajan avatar Apr 26 '17 08:04 Iniyarajan

Hey,

To better understand what's going wrong I need to know how are you integrarting SkyFloatingLabelTextField in your project?

k0nserv avatar Apr 26 '17 09:04 k0nserv

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 screen shot 2017-04-26 at 2 55 28 pm

Iniyarajan avatar Apr 26 '17 09:04 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?

k0nserv avatar Apr 26 '17 09:04 k0nserv

Yes, I used the xcworkspace, But It shows error as below screenshot.After removing the source in project only with cocoa pods. screen shot 2017-04-26 at 3 09 48 pm

Iniyarajan avatar Apr 26 '17 09:04 Iniyarajan

I don't see an import statement for SkyFloatingLabelTextField in there. If you add

@import SkyFloatingLabelTextField

Does that solve it?

k0nserv avatar Apr 26 '17 09:04 k0nserv

Now, I added and the error as below, screen shot 2017-04-26 at 3 14 50 pm screen shot 2017-04-26 at 3 14 08 pm

Iniyarajan avatar Apr 26 '17 09:04 Iniyarajan

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

k0nserv avatar Apr 26 '17 09:04 k0nserv

Yes, i checked all the outlets are connected correctly.But it works for SkyFloatingLabelTextField, it crashes only while using SkyFloatingLabelTextFieldWithIcon

Iniyarajan avatar Apr 26 '17 09:04 Iniyarajan

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

k0nserv avatar Apr 26 '17 10:04 k0nserv

@Iniyarajan did you resolve this?

k0nserv avatar May 24 '17 03:05 k0nserv