iphone - Problem with int in Objective C -
singelton.categoryid = (int)[categories.categoriesid objectatindex:indexpath.row]; nslog(@"%d", singelton.categoryid); singelton.categoryid type int.
when try print number random, if nslog(@"%@", singelton.categoryid); printed value right.
need print %d.
can me?
use intvalue method integer representation of nsstring/nsnumber. try,
singelton.categoryid = [[categories.categoriesid objectatindex:indexpath.row] intvalue];
Comments
Post a Comment