You can try using OCCalendarController , it is so simple and convenient. Just download the archived file and get all the files named after the OC prefix.
From which you can make the necessary changes to OCCalendarViewController.m by adding the Okay or Cancel buttons programmatically, on your own.
To invoke the calendar view in your main file, use the lines
//Here where the magic happens calVC = [[OCCalendarViewController alloc] initAtPoint:CGPointMake(150, 50) inView:self.view]; calVC.delegate = self; [self.view addSubview:calVC.view];
Also include the following delegate to get a date picker (if the user selects a date or date range)
- (void)completedWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate {
Finally, you can also customize the arrow (which appears along with the calendar view) using the code,
[OCCalendarViewController alloc] initAtPoint:insertPoint inView:self.view arrowPosition:OCArrowPositionRight]
Other details can be found in the read me file. Try yourself, it will work like a charm. Thanks!
source share