0

プロジェクトでカレンダー ビューを使用しています。MBCalendarKitを使用しています。その時は単独イベントショーでの単独デート。しかし、複数のイベントショーで単一の日付が必要です。しかし、どのように可能か助けてください。

- (void) viewWillAppear: (BOOL)animated{

  NSArray *title = [_caldevice valueForKey:@"pill"];
 // NSLog(@"event name fetch %@",title);

NSArray *date =[_caldevice valueForKey:@"datetaken"];
 // NSLog(@"event fetch %@",date);

NSArray*dose= [_caldevice valueForKey:@"dose"];


NSString *title1;
NSString*title2;
NSDate *date1;
NSData *imgdata;
CKCalendarEvent *releaseUpdatedCalendarKit;
NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
  dateFormatter.dateFormat = @"dd-MM-yyyy";


for (int i = 0; i < [date count]; i++){
    title1 = NSLocalizedString(title[i], @"");
    title2 = NSLocalizedString(dose[i], @"");
    NSString *combined = [NSString stringWithFormat:@"%@ - %@", title1, title2];

    date1 = [dateFormatter dateFromString:date[i]];


    releaseUpdatedCalendarKit = [CKCalendarEvent eventWithTitle:combined andDate:date1 andInfo:Nil];

   // NSLog(@"Event: %@ , %@",combined,date1);
   // releaseUpdatedCalendarKit = [CKCalendarEvent eventWithTitle:combined andDate:date1 andInfo:Nil andColor:[UIColor blueColor]];


    self.data[date1] = @[releaseUpdatedCalendarKit];
}


}
4

1 に答える 1