0

我想显示加载进程的倒计时,并了解不允许将ARC其转换intNSString. 我怎样才能显示我count的内NSString

static int count = 0;
count++;

NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:(5.0) 
                          target:self 
                          selector:@selector(uploadData) 
                          userInfo:nil 
                          repeats:NO];

if (count <= 5)
{
    ilabel.text = @"Please be patient...";
    NSString *counter = count;
    counterLabel.text = counter;
}
4

2 回答 2

2

可能最简单的方法是:

NSString* counter = [NSString stringWithFormat: @"%d", count];
于 2013-03-16T18:43:21.267 回答
1
counterLabel.text = [NSString stringWithFormat:@"%d",count];
于 2013-03-16T18:43:06.073 回答