ios - 如何保证应用风格统一?
阿神
阿神 2017-04-17 13:23:39
[iOS讨论组]
阿神
阿神

闭关修行中......

全部回复(2)
PHP中文网

你需要有一個統一的風格,才能保證風格統一。

即便從概念上你描述得很清楚,但到解決問題時,這樣的泛泛是遠遠不夠的。
全局設置風格的方法,一定跟具體的統一風格有關。

不存在一個對任意統一風格有效的設置方法(它們之間可能會矛盾)。

當然如果你的統一風格確定了,設置方法也就確定了。
比如你只需要將 tint color 統一爲紅色,那麼:

Previously, this would have required many lines of color-setting code,
however in iOS 7 its as easy as setting the tint color of the main
UIView for this feature to change it and all of its subviews with one
line:

self.view.tintColor = [UIColor redColor];

https://www.captechconsulting.com/blog/steven-beyers/ios-7-tutorial-series-tint-color-and-easy-app-theming

即可。

但如果你想像 Google 那樣把 material design 帶到 iOS,那麼你需要一個框架,其它部分用框架開發。

高洛峰

是可以做到的。
https://developer.apple.com/videos/wwdc/2011/
Customizing the Appearance of UIKit Controls

With iOS 5, you can customize the look of your app controls using the new Appearance APIs. The new Appearance Proxy API allows you to efficiently apply a custom appearance to your views and controls, including built-in controls such navigation, tab, and toolbars. These customizations can be applied across your entire app or independently on a per-control basis.

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号