Benutzen Sie den Code für die Show Download Fortschritt in ProzentFortschritte in Etikett
float progress = [[NSNumber numberWithInteger:totalBytesWritten] floatValue];
float total = [[NSNumber numberWithInteger: totalBytesExpectedToWrite] floatValue];
NSString *percentage = [NSString stringWithFormat:@"%d%%", (int)((progress/total)*100)];
[_label setText:[NSString stringWithFormat:@"%@%%", percentage]];
_label = [[UILabel alloc]initWithFrame:CGRectMake(323.43, 148.84, 42, 19)];
[_label setText: percentage];
_label.numberOfLines = 1;
_label.baselineAdjustment = UIBaselineAdjustmentAlignBaselines;
_label.adjustsFontSizeToFitWidth = YES;
_label.minimumScaleFactor = 10.0f/12.0f;
_label.clipsToBounds = YES;
_label.backgroundColor = [UIColor blackColor];
_label.textColor = [UIColor whiteColor];
_label.textAlignment = NSTextAlignmentCenter;
[self.view addSubview:_label];
Wenn ich _label.backgroundColor = [UIColor blackColor];
Fortschritt Label Arbeit richtig zu verwenden. Aber wenn ich _label.backgroundColor = [UIColor clearColor];
Zahlen übereinander überlagern
Warum?
_label.backgroundColor = [UIColor blackColor];
_label.backgroundColor = [UIColor clearColor];
Wenn jemand die Antwort Ihr Problem gelöst, könnte man es als Antwort akzeptieren wollen das große Checkbox. – Juan