Model Objects and Methods


Hi -

In my header file, why do I have to put my object instances in curly brackets {}, but I don’t have to put my method names in curly brackets?


    NSMutableArray *questions
    NSMutableArray *answers

- (IBAction) showQuestion: (id) sender;
- (IBAction) showAnswer: (id) sender;

Thanks for the help!


That’s just an Objective-C syntax rule; there is probably an underlying compiler parsing reason for it. If the curly braces bother you, you will be glad to know that you will soon learn how to replace the entire instance-variable section using the @property directive.