Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/KalView.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,19 @@ - (void)addSubviewsToHeaderView:(UIView *)headerView
NSArray *fullWeekdayNames = [[[[NSDateFormatter alloc] init] autorelease] standaloneWeekdaySymbols];
NSUInteger firstWeekday = [[NSCalendar currentCalendar] firstWeekday];
NSUInteger i = firstWeekday - 1;
for (CGFloat xOffset = 0.f; xOffset < headerView.width; xOffset += 46.f, i = (i+1)%7) {

float offset_tile;
if ([[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPhone )
{
offset_tile = 46.f;
}
else
{
offset_tile = 110.f;
}

for (CGFloat xOffset = 0.f; xOffset < headerView.width; xOffset += offset_tile, i = (i+1)%7) {

CGRect weekdayFrame = CGRectMake(xOffset, 30.f, 46.f, kHeaderHeight - 29.f);
UILabel *weekdayLabel = [[UILabel alloc] initWithFrame:weekdayFrame];
weekdayLabel.backgroundColor = [UIColor clearColor];
Expand Down