文本在背景中浮动的自定义视图(如语音控制应用程序)
我将如何创建一个背景有各种文本字符串以不同的不透明度和速度浮动的视图,就像在语音控制应用程序的背景中一样?我很感激任何代码或可以查看的地方。谢谢!
顺便说一句,我更喜欢一个不特定于 4.0 的解决方案...我必须在第一代设备上运行它,因此 3.1.3 的 API 与我在这里可以使用的一样高。
How would I go about creating a view where the background has various text strings floating by at different opacities and speeds, like in the Voice Control app's background? I'd appreciate any code or places where to look. Thanks!
BTW I'd prefer a solution that isn't 4.0 specific...I have to run this on a first-gen device, so 3.1.3's API is as high as I can use here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以编程方式添加
UILabels
,并改变不透明度、颜色和字体,然后在视图中为它们设置动画。只需在循环中更改标签的位置就会导致该位置被动画围绕。您也可以在核心文本中执行此操作,但它不会为您带来任何好处,并且动画制作会明显更加困难。
Add
UILabels
programmatically, with variations on opacity, color, and font, then animate them across the view. Just changing the location of the labels in a loop will result in the location being animated around.You could also do it in Core Text, but it wouldn't gain you anything and would be significantly more difficult to animate.