nsstring - Learning about NSNumber -
if i`m getting string iboutlet use:
nsstring *stringname = [[self iboutletname] text];
but how can value if it`s number?
here ya go:
nsstring * somenumberstring = [[self iboutletname] text]; int someint = [somenumberstring intvalue];
note, i'm sure there more, asa starter, can use:
float somefloat = [somefloatstring floatvalue]; // floats double somedouble = [somedoublestring doublevalue]; // doubles
if want string value nsnumber do:
nsstring * stringvalue = [somensnumber stringvalue];
Comments
Post a Comment