如何更改导航栏中标题的大小以适合文本
好吧,我需要更改导航控制栏上的文本,以适应比可用空间更长的电影“标题”。我已经看到更多使用这样的标签调整文本大小的代码:
UILabel *bigLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 120, 30)];
bigLabel.text = titoloSource;
bigLabel.font = [UIFont systemFontOfSize:22.0];
[bigLabel setFont:[UIFont boldSystemFontOfSize:16.0]];
[bigLabel setBackgroundColor:[UIColor clearColor]];
[bigLabel setTextColor:[UIColor whiteColor]];
[bigLabel setText:self.title];
[self.navigationController.navigationBar.topItem setTitleView:bigLabel];
self.navigationItem.titleView = bigLabel;
但我知道appel GUI 行指南说我们不能制作低于特定尺寸的小文本。现在我想:为什么我不能制作动画滑块文本?
那么,有人知道一种方法来制作动画文本,滚动标签内的所有“标题”???
谢谢
Well I need to change a text on my navigation control bar to fit a movie "title" longer than the space available. I've see more code for resize the text using a label like this:
UILabel *bigLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 120, 30)];
bigLabel.text = titoloSource;
bigLabel.font = [UIFont systemFontOfSize:22.0];
[bigLabel setFont:[UIFont boldSystemFontOfSize:16.0]];
[bigLabel setBackgroundColor:[UIColor clearColor]];
[bigLabel setTextColor:[UIColor whiteColor]];
[bigLabel setText:self.title];
[self.navigationController.navigationBar.topItem setTitleView:bigLabel];
self.navigationItem.titleView = bigLabel;
But I Know that the appel GUI line guide say that we can't make a small text below a certain measure. Now I've think: WHY CAN'T I MAKE an animated slider text?
So, Someone know a way to make a text animated that scroll all the "title" inside a label???
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论