UILabel文字发光和选框
我使用它来滚动uilabel文本, 这用于发光效果。 但是我想要发光和选框uilabel文本,我已经从上面的代码用RSSGlowLabelclass替换了UILabel。 但我没有得到发光效果。 谁能告诉我怎样才能实现这一点。
如果你自己编写它可能会容易得多。 从这开始:
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方法,或者为选取框创建单独的方法,并为控制它创建另一个计时器,这样就可以独立控制这两个方法。
- 使用iOS 8的UIImagePickerController cameraViewTransform没有缩放
- 当前视图控制器当前tabBarController与NavigationController
- 如何在ActionScript 3中将图片/图片从iPhone上传到应用程序?
- Xcode 5您的二进制文件在validation时未针对iPhone 5进行优化
- 加载一些视图时如何隐藏UITabBarView?
- 访问由UIImagePickerController – iOS / iPhone拍摄的图像的元数据(exif标签)
- 在我的iPhone集成Facebook应用程序,但是当我张贴在我的墙上我的朋友无法分享我该怎么办?
- 故事板和笔尖兼容?
- 添加视图作为应用程序顶层窗口的子视图时,警报视图不可见
- 归属文本背景上的圆angular是否可能?
- 为实体插入新的对象的CoreData给我错误时使用setValue:forKey:与一个int