singelton.categoryId = (int)[categories.categoriesId objectAtIndex:indexPath.row];
NSLog(@"%d", singelton.categoryId);
singelton.categoryId
is from type int
.
But when I try to print it number is random, but if I do this NSLog(@"%@", singelton.categoryId);
the printed value is right.
I need to print it with %d
.
Can someone help me?