Hi i've got the following code in a ViewController.h:
#import <UIKit/UIKit.h>
@interface CalcViewController : UIViewController {
NSNumber* result;
NSString* input;
//NSString* input = @"";
IBOutlet UITextField* display;
}
@property (retain) NSNumber* result;
@property (retain) NSString* input;
@property (nonatomic, retain) UITextField* display;
@end
The problem is that I want to append a string to input but this is not possible when its still null. Thats why I want to set the default value of input to be @"". But where do I put this code.
I'm aware of one possible solution where you put it in a default constructor. But I've got no idea in what file to put this. And where I should call it from.
I unfortunately only got a limited understanding of C and realise that perhaps a .h file is not the right place.
The project type is a View-Based-Application if you should need this.
Hope you can help.