I teach myself Objective-C and iOS programming using the "IOS Programming: The Big Nerd Ranch guide (2nd Edition)), and I had a problem when the tutorial wants me to create connections to the application delegation object, but this object is not appears in the Objects list in the interface builder for me. I’m sure this is either a typo or maybe a different version, because the book is slightly behind my version of Xcode (4.2). I have included the code. that the MOCAppDelegate object is something that should appear in IB, but I'm not yet familiar enough to know what code changes I need to do . S specific question: how do I configure the code below to get the object in the list of objects in IB, so that I can perform the connection as shown in the graphic tutorial?
Note. I researched and found this: Failed to connect instance variables to AppDelegate , but this solution did not work for me (or I did not implement it correctly)
Header file
#import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> #import <MapKit/MapKit.h> @interface MOCAppDelegate : UIResponder <UIApplicationDelegate, CLLocationManagerDelegate> { CLLocationManager *locationManager; IBOutlet MKMapView *worldView; IBOutlet UIActivityIndicatorView *activityIndicator; IBOutlet UITextField *locationTitleField; } @property (strong, nonatomic) IBOutlet UIWindow *window; @end
Implementation file
source share