Я использую this для прокрутки текста uilabel и this для эффекта свечения. Тем не менее, я хочу, чтобы текст glow и marquee uilabel, я заменил UILabel на RSSGlowLabelclass из кода выше. но я не получаю эффект свечения. может ли любой орган сказать мне, как я могу это достичь.UILabel text glow and marquee
1
A
ответ
4
Это, вероятно, намного проще, если вы сами его кодируете. Начните с этого:
float alph = 0.7;
- (void)viewDidLoad {
[super viewDidLoad];
glowLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
NSString *string = @"some text";
glowLabel.text = string;
glowLabel.textColor = [UIColor blueColor];
[self.view addSubview:glowLabel];
glowLabel.alpha = alph;
[NSTimer scheduledTimerWithTimeInterval:0.4
target:self
selector:@selector(glowMarquee)
userInfo:nil
repeats:YES];
}
-(void)glowMarquee {
alph = (alph == 1) ? 0.7 : 1; // Switch value of alph
[UIView beginAnimations:@"alpha" context:NULL];
[UIView setAnimationDuration:0.4];
glowLabel.alpha = alph;
[UIView commitAnimations];
}
Теперь просто добавьте шатер логики методы glowMarquee, или создать отдельный метод для бегущей строки и другого таймера для управления его, таким образом, два может управляться независимо друг от друга.
Смежные вопросы
- 1. IPhone Text Glow Effect
- 2. Raphael Text Glow
- 3. Marquee Effect - UILabel/UITextView
- 4. UILabel auto scroll как marquee
- 5. WPF Marquee Text Animation
- 6. Marquee Text на Blackberry
- 7. HTML Marquee - Static text
- 8. Html marquee change text
- 9. Jquery scrolling text like marquee
- 10. Как сделать marquee UILabel/UITextField/NSTextField
- 11. UILabel cut off text
- 12. UILabel blur only text
- 13. UILabel Text Not Wrapping
- 14. UILabel text scaling, Programatically?
- 15. UILabel text offset/indent
- 16. UILabel text updation
- 17. Swift UILabel Text Links
- 18. android widget text view marquee scroll
- 19. Android Textview Marquee Text Onclick new Activity
- 20. Обновление UILabel Text сбрасывает раскадровку?
- 21. CustomView UILabel Set Text Краш
- 22. iPhone UILabel text soft shadow
- 23. Невозможно установить UILabel Text Programmatically
- 24. blink UILabel text swift2 ios
- 25. html: text and createElement
- 26. Layering Images and Text
- 27. Text View and Intent
- 28. Text and Button align
- 29. Как применить эффект Glow к QLabel Text в Qt?
- 30. @keyframes text text fade and shine
Опубликовать код, пожалуйста? – HM1
"yourlabel.glowAmount =?". Попробуйте установить это для более высокого значения. –
@Prernachavan Помог ли мой ответ? Если бы это было так, не могли бы вы пометить его как правильно? –