I am new to iOS, if you look at the following code, I would expect both x and y to be "hello"
- (void)viewDidLoad {
[super viewDidLoad];
NSString *x,*y;
y= [x getstring];
}//viewDidLoad
-(NSString *)getstring{
return @"hello";
}
Yet, I get this error: No visible @interface for NSString declares the selector 'getString'
I tried many things, I defined getstring in the .h file
Objective-C