本文介绍了如何在导航栏上移动文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好我必须在导航栏上移动文本..我对滚动文本一无所知。有人对此有所了解请告诉我。
Hi I have to move the text on navigation bar..I don't have any idea about scrolling text. Is anybody have idea about this please let me know.
谢谢
推荐答案
将这些文件添加到您的项目中并将其导入到您的类中,然后在您的视图中添加以下命令do load.I希望您为您的应用程序使用基于导航的模板。
ADD this files in to your project and import it in to your class then add the following command in your view did load.I hope You are using a navigation based template for your application.
然后在viewdidload中
and then in viewdidload
AutoScrollLabel *autoScrollLabel=[[AutoScrollLabel alloc] initWithFrame:CGRectMake(10, 15, 320, 16)];
autoScrollLabel.text = @"Hi Mom! How are you? I really ought to write more often.";
autoScrollLabel.textColor = [UIColor whiteColor];
//self.title = @"Resources";
//self.title = @"%@"autoScrollLabel;
[self.navigationController.navigationBar addSubview:autoScrollLabel];
这篇关于如何在导航栏上移动文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!