0

I am using Tapku calendar that is displaying the month view in it, i want to show the week view in calendar on button click. What changes are required to made and where in the code. Please guide for the above. And ask if anything else required to know to answer the question. Thanks in advance.

iPhone Programmatically
  • 1,211
  • 2
  • 22
  • 54
  • Please refer this link.[different types of calendar](https://www.cocoacontrols.com/search?utf8=✓&q=calendar) – IKKA Apr 23 '13 at 06:25
  • I am working on Tapku calendar and has already implemented the functionality on month view, so can't change to any other now, please share if you have any idea or code for week view in tapku itself. – iPhone Programmatically Apr 23 '13 at 06:37
  • Tapku allows monthView only.For weekView use another [library](https://github.com/muhku/calendar-ui).From this library take weekViewController and relate classes then implement to your current project. – IKKA Apr 23 '13 at 06:55

1 Answers1

1

Use in the same view controllers a

  1. @property(nonatomic, strong) TKCalendarDayTimelineView *calendarDayTimelineView;
  2. @property(nonatomic, strong) TKCalendarMonthTableView *calendarMonthTableView;
  3. @property(nonatomic) NSUInteger calendarViewType;

Implement the required delegates: <TKCalendarDayTimelineViewDelegate> and <TKCalendarMonthViewDelegate,TKCalendarMonthViewDataSource>

After that make a method to hide and show this views:

- (IBAction)calendarViewAction:(id)sender
{
 if (self.calendarViewType == 1) {
        [self.calendarDayTimelineView setHidden:NO];
    } else {
        [self.calendarDayTimelineView setHidden:YES];     
    }

    if (self.calendarViewType == 0) {
        [self.calendarMonthTableView setHidden:NO];
    } else {
        [self.calendarMonthTableView setHidden:YES];
    }
}
alexcristea
  • 2,316
  • 16
  • 18