I have created this NSObject subtype class:
#import <Foundation/Foundation.h>
#import "SQLiteManager.h"
@interface clickEventManagement : NSObject{
SQLiteManager *dbManager;
NSURLConnection *adsconnection;
NSMutableData *responseData;
}
@property (strong, nonatomic) NSURLConnection *adsconnection;
-(void) insertClickAdd:(int)zona;
-(void) insertPrintAdd:(int)zona;
-(NSArray*) loadClicks;
@end
And I have declared it in the AppDelegate.h:
#import "clickEventManagement.h"
@interface AppDelegate : NSObject <UIApplicationDelegate, AVAudioSessionDelegate>
{
BOOL firstRun;
AVPlayer *player;
clickEventManagement *clickEvent;
}
@property (strong, nonatomic) clickEventManagement *clickEvent;
But clickEventMangement methods are not available when I try to implement them in the - (void)applicationDidEnterBackground:(UIApplication *)application delegate.
EDITED
- (void)applicationDidEnterBackground:(UIApplication *)application
{
clickEvent = [[clickEventManagement alloc] init];
[clickEvent -> "loadClicks" method is not available in the Xcode list
}
Same class in other view controllers, declared in the same way, are available.
Thanks!