可定制的主题颜色在 ios 中设计应用程序 [英] Customizable Theme Colour to design Application in ios

查看:31
本文介绍了可定制的主题颜色在 ios 中设计应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要制作可根据用户想要的主题进行定制的应用程序设计.

I need to make Application Design that can be customizable according to User's wanted Theme.

我应该只在一个地方更改颜色,并且应该更改整个应用程序主题.

I should only change colour at one place only and whole application theme should be changed.

注意:不同的主题包含不同的主题颜色.

NOTE: Different Theme Contains Different Theme Colours.

我所做的是制作一个这样的调色板.

What I have did is Make a colour palette like this.

在此图像中,如果我将 ThemeColor 更改为 Green 而不是 Blue,那么我曾经使用过 ThemeColor代码>,那么应该用Green代替.

In this image, if I change ThemeColor to Green instead of Blue then where ever I have used the ThemeColor, then it should be done Green instead.

但我找不到自定义这种颜色的方法.或者任何其他方式,我错过了满足我的要求?

But I can't able find a way to customise this colours. Or any other way, I am missing out to achieve my requirement?

感谢任何帮助..

推荐答案

如果您正在使用目标 iOS 7+ 开发您的项目并使用默认的 iOS UI 对象,您可以通过更改 来管理主题>tintColor 属性的 UIView 和使用 UIAppearance 协议.

If you are developing your project with target iOS 7+ and using default iOS UI objects, you can manage theming by changing tintColor property of UIView and using UIAppearance Protocol.

而且是的,您也可以从 storyboard/xib 更改 tintColor.

And Yes, you can change tintColor from storyboard/xib too.

最佳教程:https://www.raywenderlich.com/108766/uiappearance-教程

--- 更新 ---

对于所有 iOS 版本:如何为 iphone 应用创建多个主题/皮肤?

希望对你有帮助.:)

这篇关于可定制的主题颜色在 ios 中设计应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆