私はこれに関してすでにスタックにいくつかの質問があることを知っています、そして私はそれらすべてを通り抜けてきました。
デバッグすると、デリゲートメソッドを呼び出すコード行が無視されているように見えます。ここに行があります:
[_delegate insertDataLocation:dbLocation Time:dbTime Reminder:dbReminder];
デリゲートが適切に設定されていないことが問題であると想定しているので、次のように設定しました。
ViewController.h
@protocol mapDelegate;
@interface ViewController : UIViewController
@property (strong, nonatomic) id<mapDelegate> delegate;
ViewController.m
@synthesize delegate = _delegate;
- (void)viewDidLoad
{
[super viewDidLoad];
[self setDelegate:_delegate];
}
//Here's where I call the method, FYI
[_delegate insertDataLocation:dbLocation Time:dbTime Reminder:dbReminder];
AppDelegate.h
@protocol mapDelegate
-(void)insertDataLocation:(NSString*)l Time:(NSString*)t Reminder:(NSString*)r;
@end
@interface AppDelegate : UIResponder <UIApplicationDelegate, mapDelegate>
AppDelegate.m
-(void)insertDataLocation:(NSString*)l Time:(NSString*)t Reminder:(NSString*)r {
//Here's my method's code
}