When doing this tutorial (you can simply download the sample code), I tried to add two NSStrings in order to be able to dynamically change the title and subtitle of my pin annotations from a seperate class that calls the AddressAnnotation class.
This is the header code:
First, why don't mTitle and mSubTitle need @property and @synthesize?
Second, is there anyway to access these two strings, I can't figure out how to change them, it won't work! I've tried things like
but no cigar...
And then when I try to add my own NSStrings it throws an error for the @synthesize saying there is no property definition in the header file!?
Any help greatly appreciated!
This is the header code:
Code:
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface AddressAnnotation : NSObject<MKAnnotation> {
CLLocationCoordinate2D coordinate;
NSString *mTitle;
NSString *mSubTitle;
}
@end
First, why don't mTitle and mSubTitle need @property and @synthesize?
Second, is there anyway to access these two strings, I can't figure out how to change them, it won't work! I've tried things like
Code:
[AddressAnnotation setmTitle:@"blabla"];
And then when I try to add my own NSStrings it throws an error for the @synthesize saying there is no property definition in the header file!?
Any help greatly appreciated!