Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Apply theme to a class #22

Closed
oleynikd opened this issue Apr 30, 2015 · 1 comment
Closed

Apply theme to a class #22

oleynikd opened this issue Apr 30, 2015 · 1 comment

Comments

@oleynikd
Copy link

Sorry for stupid question, but is it possible to apply theme for ex. for all UIView's? Like [[UIView appearance] setTheme...]

I'm asking because I can't figure out how to apple theme for IASKAppSettingsViewController for example... Or just for all my views in the whole app.

Thanks.

@erichoracek
Copy link
Owner

Are you asking if Motif can automatically apply a style to all views that match a certain set of rules (e.g. all UIButtons contained within a certain UIViewController are styled a certain way)? If so, the answer is no—Motif intentionally does not automatically apply themes for you—you must apply them yourself using applyThemeClass:toObject: on MTFTheme or MTFDynamicThemeApplier.

This choice was intentional—having a set of rules that define automatically-applied styles across all of your interface can quickly get out of hand, becoming hard to manage corner cases with. In this case, Motif errs on the side of keeping things simple to prevent future complexity in your theme files.

If this is not your question, feel free to reopen.

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

No branches or pull requests

2 participants