nsstring - why does my objective c code keep saying data argument not used by format string -


-(void) timerrun{     secondscount = secondscount - 1;     int minuts = secondscount /60;     int seconds = secondscount - (minuts * 60);      nsstring *timeroutput = [nsstring stringwithformat: @"%2d:.2d" , minuts, seconds];     countdownlabel.text = timeroutput;      if (secondscount == 0) {         [countdowntimer invalidate];         countdownlabel = nil;     } } 

xcode telling me in nsstring line data argument not used format string , every time try run timer appears is: 2d:.2d knows objective c please on code.

you're missing percent sign there, buddy.

nsstring *timeroutput = [nsstring stringwithformat: @"%2d:.2d" , minuts, seconds];

.2d isn't replacement spec.


Comments

Popular posts from this blog

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -

c# - Send Image in Json : 400 Bad request -