here에 대한 자습서를 따르고 있으며, 알림 및 모든 이벤트 관리로 구성되어 있습니다. 이제 문제는 내가 다음 코드'title'속성이 'eventstore'유형의 개체에서 발견되지 않았습니다.
내 .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는"
귀하의 코드가 그 오류 메시지와 일치하지 않는다고 생각합니다. 그 자체는 실재하지 않습니다. (a) Xcode에서 * 직접 * 오류 메시지를 복사하여 붙여 넣을 수 있으며 (b) 실제로 eventDB.title 대신에 myEvent.title을 실제로 설정하고 있는지 다시 확인 할 수 있습니까? – Tim
확인 오류 해결책을 찾았습니다. 코드를 잘못 작성했습니다. 나는 EKEvent * myEvent = [EKEvent eventWithEventStore : eventDB];를 쓰는 대신'EKEventStore * myEvent = [EKEvent eventWithEventStore : eventDB];를 작성했다. 당신이 내가 투표 할 수 있도록 내가 준이 답변으로 대답 해 주시겠습니까? – user1529095