0

I have an NSProgressIndicator which I use in the following way:

double ProgressLength = 1/(double)[[fh componentsSeparatedByString:@"\n"] count]*100;
NSProgressIndicator *MyIndicator = _ProgressIndicator;

for (NSString *line in [fh componentsSeparatedByString:@"\n"]) {
    [MyIndicator incrementBy:ProgressLength];
     // Some other staff
}
[MyIndicator setDoubleValue:100];
[MyIndicator display];

When the loops ends [MyIndicator doubleValue] = 99.99999 so I thought that this was the reason why the bar was not 100% full, so I specifically set it to 100, but still the bar is not full.

Any thoughts???

thanks, Alex

4

1 回答 1

0

NSProgressIndicator 有一个maxValue属性。如果您将其设置为更高的值,则条将不会在 100 处满。这可以在代码和 Interface Builder 中完成。

于 2014-02-06T13:52:03.113 回答