寻求你的帮助
获取设备标识符时我遇到了问题.实际上我使用的是UIDevice + IdentifierAddition.h,NSString + MD5Addition.h类来获取Identifier,但它为我的所有设备返回相同的标识符,即iPhone 4s(iOS 7.1)和iPhone 5(iOS 7.1.1).
任何人都可以解决这个问题.因为我想要一个特定于设备的东西.它是我的应用要求.
重要提示:我想在应用程序商店提交此应用程序,所以请回答必须符合指南
寻找我的问题的解决方案,我必须在环中填充颜色.我可以用我的代码填充一个颜色,但我遇到了一些问题
使用此代码,我无法找到如何在圆圈中填充所需的颜色数量,即20%,40%,70%等.
当我给出渐变色时,它不是如图所示.
我正在使用的代码:
int radius = 130;
CAShapeLayer *arc = [CAShapeLayer layer];
arc.path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100,0) radius:radius startAngle:39.8 endAngle:19.9 clockwise:YES].CGPath;
arc.position = CGPointMake(CGRectGetMidX(self.frame)-radius,
CGRectGetMidY(self.frame)-radius);
arc.fillColor = [UIColor clearColor].CGColor;
arc.strokeColor = [UIColor redColor].CGColor;
arc.lineWidth = 25;
CABasicAnimation *drawAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
drawAnimation.duration = 5.0; // "animate over 10 seconds or so.."
drawAnimation.repeatCount = 1.0; // Animate only once..
drawAnimation.removedOnCompletion = NO; // Remain stroked after the animation..
drawAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
drawAnimation.toValue = [NSNumber numberWithFloat:100.0f];
drawAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
[arc …Run Code Online (Sandbox Code Playgroud)