tags:

views:

22

answers:

1

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.

A: 

I figured out what was going on.

I had been initializing the class via interface builder but only did it for the iphone .xib and not my ipad .xib.

MikesTooLz