The invention relates to an App start-up skin-changing strategy, which comprises the following steps: App calls the color center, sets the local preset color key value pairs in the color center, reads the plist according to the current configuration, obtains the color information in the plist, writes the color information into the color center, generates color-related key value pairs, and sets the source code at the bottom of the App. Reload the color configuration function, call the skin function from the bottom, the upper interface opens the reset element information function, and start reloading the page. According to the invention, the color information in plist is stored by the color center when the App is started, and then is called by the underlying skin replacement function and the reset element information function in the upper interface in the form of key value pairs, so as to realize the skin replacement with fast start-up speed, satisfy the individualized use demand and easy maintenance.
【技术实现步骤摘要】
一种App启动换肤策略
本专利技术涉及App换肤
,具体说是一种App启动换肤策略。
技术介绍
通常,iOS中的App实现换肤时,采用以下几种方式。本地换肤方式。本地换肤,是通过包里面自身已经拥有的图片和颜色配置,对视图以及各控件切换主题色。优点是工作量相对较少,不需要后台人员配合。缺点是局限性比较大,必须通过发包的形式才能更新最新的皮肤颜色,也不能根据节日更换app主题。远程换肤方式。远程换肤,是通过后台配置的方式,下载新的皮肤对app重新布局。也可以在app当天的第一次启动时,发送请求给后台,通过后台的服务器时间,缓存最新的节日皮肤。并在节日当天换上最新的皮肤。优点是可以灵活配置各种皮肤,并且也不会占用太多的安装包大小。缺点是工作量大,耗时长,需要后台人员配合。
技术实现思路
针对现有技术中存在的缺陷,本专利技术的目的在于提供一种App启动换肤策略,App启动时,通过颜色中心,存储plist中的颜色信息,然后以键值对的形式供底层换肤函数和上层界面中的重置元素信息函数调用,实现启动换肤,换肤速度快,满足个性化使用需求,且易于维护。为达到以上目的,本专利技术采取的技术方案是:一种App启动换肤策略,其特征在于,包括如下步骤:App调用颜色中心,在颜色中心中设置本地预设颜色键值对Key-Value,根据当前配置读取属性列表文件plist,获取plist中的颜色信息,将颜色信息写入颜色中心,生成颜色相关的键值对,在App底层源码设置重新载入颜色配置函数,从底层开始循环调用换肤函数,上层界面开启重置元素信息函数,开始重新载入页面。在上述技术方案的基础上,开始重 ...
【技术保护点】
1.一种App启动换肤策略,其特征在于,包括如下步骤:App调用颜色中心,在颜色中心中设置本地预设颜色键值对Key‑Value,根据当前配置读取属性列表文件plist,获取plist中的颜色信息,将颜色信息写入颜色中心,生成颜色相关的键值对,在App底层源码设置重新载入颜色配置函数,从底层开始循环调用换肤函数,上层界面开启重置元素信息函数,开始重新载入页面。
【技术特征摘要】
1.一种App启动换肤策略,其特征在于,包括如下步骤:App调用颜色中心,在颜色中心中设置本地预设颜色键值对Key-Value,根据当前配置读取属性列表文件plist,获取plist中的颜色信息,将颜色信息写入颜色中心,生成颜色相关的键值对,在App底层源码设置重新载入颜色配置函数,从底层开始循环调用换肤函数,上层界面开启重置元素信息函数,开始重新载入页面。2.如权利要求1所述的App启动换肤策略,其特征在于:开始重新载入页面后,首先读取颜色中心中的颜色值,如果读取失败,则尝试...
【专利技术属性】
技术研发人员:邱扬,
申请(专利权)人:北京酷我科技有限公司,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。