I have created my iPhone apps but I have a problem.
I have a classViewController where I have implemented my program.
I must alloc 3 NSMutableArray but I don’t want do it in grapich methods.
There isn’t a constructor like Java for my class?
// I want put it in a method like constructor java
arrayPosition = [[NSMutableArray alloc] init];
currentPositionName = [NSString stringWithFormat:@"noPosition"];
Yes, there is an initializer. It’s called
-init, and it goes a little something like this:Edit: Don’t forget
-dealloc, tho’.As a side note, using native language in code is generally a bad move, you usually want to stick to English, particularly when asking for help online and the like.