I have a class that im using and cant get the code to fire
WeatherServer.m
----------------------
- (NSArray *)weatherItemsForMapRegion:(MKCoordinateRegion)region maximumCount:(NSInteger)maxCount
{
//code is not firing
}
myviewcontroller.h
-----------------------
@class WeatherServer;
@interface MapView : UIViewController <MKMapViewDelegate, UITextFieldDelegate, CLLocationManagerDelegate, ADBannerViewDelegate> {
WeatherServer *weatherServer;
}
@property(nonatomic, retain) IBOutlet WeatherServer *weatherServer;
@end
myviewcontroller.m
----------------------
#import "WeatherServer.h"
@implementation MapView
@synthesize weatherServer;
- (void)mapView:(MKMapView *)map regionDidChangeAnimated:(BOOL)animated
{
NSArray *weatherItems = [weatherServer weatherItemsForMapRegion:mapView.region maximumCount:300];
[mapView addAnnotations:weatherItems];
}
@end
regionDidChangeAnimated fires ok however, the code in weatherItemsForMapRegion never gets fired.