-
Notifications
You must be signed in to change notification settings - Fork 43
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
Protocol extension methods not available from Objective-C #5
Comments
Hi @niklasberglund! Thank you for your feedback! No, you didn't misunderstand. The thing is, the As a workaround, and because this protocol extension is very simple, you can do what that method does on the extension, which is, setting the @import macOSThemeKit;
@implementation AppDelegate
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
TKDarkTheme *darkTheme = [TKThemeManager darkTheme];
[[TKThemeManager sharedManager] setTheme:darkTheme];
}
@end I'm sorry for the trouble - I need to update the docs about this. I will later dig into this to check if I can come with a better alternate implementation. |
@niklasberglund just a quick follow-up: The Thanks and sorry for the inconvenience. |
Perfect! Thank you. Look forward to trying it out more. |
Had a go at trying ThemeKit out in an Objective-C project. Using it with Objective-C doesn't seem very trivial. I tried importing
<macOSThemeKit/macOSThemeKit-Swift.h>
, grabbing an instance of dark theme with:TKDarkTheme *darkTheme = [TKThemeManager darkTheme]
Then I should invoke the
apply
method on thedarkTheme
object right? ButTKDarkTheme
don't have any apply method.Did I misunderstand how to apply a theme?
The text was updated successfully, but these errors were encountered: