私はここで、通知とすべてを含むイベント管理で構成されるチュートリアルに従っています。今問題は私が次のコードでエラーを取得していることです
私の.hファイル
#import <UIKit/UIKit.h>
#import <EventKit/EventKit.h>
@interface ViewController : UIViewController
- (IBAction) NewEvent:(id)sender;
@end
私の.mファイル
#import "ViewController.h"
#import <EventKit/EventKit.h>
@interface ViewController ()
@end
@implementation ViewController
- (IBAction) NewEvent:(id)sender {
EKEventStore *eventDB = [[EKEventStore alloc] init];
EKEventStore *myEvent = [EKEvent eventWithEventStore:eventDB];
myEvent.title = @"New Event"; // <-- Errors are appearing hear as shown in the title.
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
@end
追加情報: フレームワークをすでに追加しましたが、上記のコードに示すようにエラーが発生します。コードの名前は
タイプ「eventstore」のオブジェクトでプロパティ「title」が見つかりませんでした
前もって感謝します :)