I have implemented JTCalendar view to get both month and week view but in week view,i need to get two week view .Suggest me coding.
JTCalendar code:
CGFloat x = 0;
CGFloat width = self.frame.size.width / 7.;
CGFloat height = self.frame.size.height;
if(self.calendarManager.calendarAppearance.readFromRightToLeft)
{
for(UIView *view in [[self.subviews reverseObjectEnumerator] allObjects])
{
view.frame = CGRectMake(x, 0, width, height);
x = CGRectGetMaxX(view.frame);
}
}
else{
for(UIView *view in self.subviews)
{
view.frame = CGRectMake(x, 0, width, height);
x = CGRectGetMaxX(view.frame);
}
}
[super layoutSubviews];
#//weeksToDisplay
- (void)configureConstraintsForSubviews
{
CGFloat weeksToDisplay;
if(cacheLastWeekMode)
{
weeksToDisplay = 1 ;
}
else{
weeksToDisplay = (CGFloat)(WEEKS_TO_DISPLAY + 1); // + 1 for weekDays
}
CGFloat y = 0;
CGFloat width = self.frame.size.width;
CGFloat height = self.frame.size.height / weeksToDisplay;
for(int i = 0; i < self.subviews.count; ++i){
UIView *view = self.subviews[i];
view.frame = CGRectMake(0, y, width, height);
y = CGRectGetMaxY(view.frame);
if(cacheLastWeekMode && i == weeksToDisplay + 1){
height = 0.;
}
}
}