Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown class TabsControl #38

Closed
hk05 opened this issue Nov 8, 2018 · 13 comments
Closed

Unknown class TabsControl #38

hk05 opened this issue Nov 8, 2018 · 13 comments

Comments

@hk05
Copy link

hk05 commented Nov 8, 2018

I downloaded KPCTabsControl and build the framework with carthage. Then I added the framework, as intended. Everything builds (without adding IB elements yet).

Next I add a a ViewController, set class "ViewController" in its Identity Inspector (ViewController.swift contains code identical to the code in the KPCTabsControlDemo).

Finally I add a NSView to this ViewControllers view and set its class to "TabsControl" in the Identity Inspector. I also bind the interface items, as in the demo.

When I run this, I get an error: "Unknown class TabsControl in Interface Builder file". The view with the tabs (obviously) does not show.

I checked the framework, which seems to embed correctly in the project. I also played with the Module name in Identity Inspector, to no avail. I rebuild and attempted several times.

I must be overlooking something here, but cannot figure it out. Do you have any idea? Any helpful pointers are highly appreciated!

Thanks

@onekiloparsec
Copy link
Owner

Hm, strange. Two things I think right now:

  • When setting the Custom Class in the Identity Inspector, does the Module field update automatically to KPCTabsControl (yes this time with KPC prefix)?
  • Have you added the .framework also in the "General -> Embedded Binaries" settings ?

@hk05
Copy link
Author

hk05 commented Nov 8, 2018 via email

@hk05
Copy link
Author

hk05 commented Nov 8, 2018

Hm, strange. Two things I think right now:

  • When setting the Custom Class in the Identity Inspector, does the Module field update automatically to KPCTabsControl (yes this time with KPC prefix)?

No, xcode 'recognizes' the TabsControl, the module field remains unchanged (empty). I tried changing this field in several ways, to no avail.

  • Have you added the .framework also in the "General -> Embedded Binaries" settings ?

Yes, the framework has been added 'the carthage way': add framework to embedded binaries.

@hk05
Copy link
Author

hk05 commented Nov 8, 2018 via email

@onekiloparsec
Copy link
Owner

onekiloparsec commented Nov 8, 2018

Hi Hans. Indeed, suprising to see it solved my magic! At least, I'm glad you can now keep going. I'll close the issue for now, but don't hesitate to reopen if needed.

@hk05
Copy link
Author

hk05 commented Nov 8, 2018 via email

@hk05
Copy link
Author

hk05 commented Nov 8, 2018 via email

@hk05
Copy link
Author

hk05 commented Nov 10, 2018 via email

@onekiloparsec
Copy link
Owner

Hi Hans. The custom setters used in KPCTabsControl are all normally and implicitely 'mutating' (this is the normal behavior). I don't see anything special in the Protocols.swoft file either. Maybe you should post here piece of your code for let us/me check.

@hk05
Copy link
Author

hk05 commented Nov 10, 2018 via email

@onekiloparsec
Copy link
Owner

Sorry, but my demo works fine on my computer... Xcode10.1 (10B61). I noticed the demo was with swift4 and not swift4.2. I changed the project to have swift4.2 everywhere. But anyway, with both versions, the demo was working fine...

@hk05
Copy link
Author

hk05 commented Nov 10, 2018 via email

@hk05
Copy link
Author

hk05 commented Nov 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants