KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to add the [NSDecimalNumber numberWithInt:i] to an array using for loop. It is hardcoded : NSArray *customTickLocations = [NSArray arrayWithObjects: [NSDecimalNumber numberWithInt:1],[NSDecimalNumber numberWithInt:2],[NSDecimalNumber numberWithInt:3],[NSDecimalNumber numberWithInt:4],[NSDecimalNumber numberWithInt:5],[NSDecimalNumber numberWithInt:6],[NSDecimalNumber numberWithInt:7],[NSDecimalNumber numberWithInt:8],[NSDecimalNumber numberWithInt:9],[NSDecimalNumber numberWithInt:10],[NSDecimalNumber numberWithInt:11],[NSDecimalNumber numberWithInt:12],nil]; I want like this, but I can add only one object here.... for (int i=0; i<totalImagesOnXaxis; i++) { customTickLocations = [NSArray arrayWithObject:[NSDecimalNumber numberWithInt:i]]; } Please help me out of this, Thanks in Advance, Madan
Tags (comma-separated)
Save Edits
Cancel