Swift and setGlobalThemeUsingPrimaryColor #115
Comments
You can use objc code in swift. E.g: Chameleon.setGlobalThemeUsingPrimaryColor(FlatPlum(), withContentStyle: .Light) |
Oh, awesome. And ... Would you drop that into the AppDelegate didFinishLaunchingWithOptions? How can you set it to apply to the entire app? |
Yeah, you can use the method in |
Using FlatPlum() doesn't work, but when I tried with UIColor.flatSandColor() it does compile. |
Follow the Installation instructions, FlatPlum() is a shorthand method located in the swift file. |
Ah. I used pod 'ChameleonFramework' instead of pod 'ChameleonFramework/Swift'. Now the shorthand methods are working. |
😉 |
Hey @bre7 I cant seem to be able to call setGlobalThemeUsingPrimaryColor using the viewcontroller's instance (self) in swift. It gives me no function error |
Hi, just to be sure: have you followed the installation instructions ? Are you able to call |
Yup, i have been using flat colors for months, i decided to use the theme feature and got this, Although i can set the theme globally however since i have a tab navigation to other view controllers this messes up my ui |
https://github.com/ViccAlexander/Chameleon#theme-methods
|
Oops oops, I am really sorry for my ignorance, that was stupid. Thank You. Just another question, how do I set the font name but its attribute (i.e bold ,italic) could be inferred from the IB |
What do you mean ? |
Is there a way to implement the setGlobalThemeUsingPrimaryColor feature in Swift or is that only available in Obj-C?
The text was updated successfully, but these errors were encountered: