简体   繁体   English

标签和NSTimer阴影设计

[英]Label and NSTimer shadow design

I'm a beginner in iOS and need some leads to do something that don't feel that easy to do ... I have to change my design for a timer (elapsed time and remaining time) that looks this way : 我是iOS的初学者,需要一些线索来做一些不那么容易做到的事情...我必须更改看起来像这样的计时器(经过的时间和剩余时间)的设计: 在此处输入图片说明

To something that look this way : 对于这样的东西:

在此处输入图片说明

Would you have any leads to give to me (except for the shadow color and offset properties that I already know) ? 您有什么线索可以给我(我已经知道的阴影颜色和偏移属性除外)吗? My principal guess for now is : How differentiate these 2 states : gray when no time and blue when there is. 我现在的主要猜测是:如何区分这两种状态:没有时间时为灰色,有时间时为蓝色。

Thank you in advance ! 先感谢您 !

You're new to iOS development, so i'm not sure if it's a good idea to throw some 3rd party framworks at your head! 您是iOS开发的新手,所以不确定将第3方framworks摆在您头上是否是个好主意! but anyway, take a look at TTTAttributetLabel . 但无论如何,请看一下TTTAttributetLabel I'ts a drop-in replacement for UILabel and lets you style the parts of a UILabel text differently, so it could fit for your needs above! 我不是UILabel的直接替代品,可以让您为UILabel文本的各个部分设置不同的样式,因此它可以满足您上面的需求!

Download the framework from the given link and look at the example project provided with it. 从给定的链接下载该框架,并查看其附带的示例项目。 And don't forget to include the CoreText framework into your project. 并且不要忘记在您的项目中包括CoreText框架。 (see " How to add existing frameworks in Xcode" ) (请参阅“ 如何在Xcode中添加现有框架”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM