It is my MyName.h:
#import <Foundation/Foundation.h>
@interface MyName : NSObject {
NSString *myName;
}
@property(readwrite) NSString *myName;
@end
and this is the .m:
#import "MyName.h"
@implementation MyName
@synthesize myName;
@end
It is my another controller.m
#import "MyName.h"
#import "MainViewController.h"
@implementation MainViewController
- (void)viewDidLoad {
self.myName = @"My Name is Peter";
}
......
@end
And I get the Request for member "myName" in something may a structure or union error. wt's happen?