简体   繁体   中英

How to change Tapku calendar to week view from month view

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.

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];
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM