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
Post a Comment