ios - Declaring a number (runningScore) that can be subtracted from and new number retained in objective c -
i looking set calculator of sorts whereby there targetscore , when click on button subtracts given number targetscore , result becomes new targetscore , process continues until targetscore 0.
i have read steven kochans book, , several objective c dummies (quite appropriate me), have looked @ tutorials on lynda.com , read million threads on here have yet find suitable answer (or @ least 1 have recognised suitable). new objective c , more prepared hard yards , research if can point me in right direction.
i not asking write code me point me in right direction, i.e. declare targetscore nsobject/nsnumber/nsdecimalnumber/nsmutablearray etc , how new targetscore retained , replace old targetscore.
i thank in advance proffered,
baby steps. smallest possible data format satisfy needs. in case - you'd short
char
(for score -128 127) or unsigned short
unsigned char
(for score 0 255). if not, int
or nsinteger
cover bases (unless score higher 2^31). it's simple integer , don't need objects (like nsnumber
or nsdecimalnumber
) simple math going do.
Comments
Post a Comment