Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6041435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:39:41+00:00 2026-05-23T06:39:41+00:00

I am using TdCalendarView code by Tinyfool in my project in which all calendar

  • 0

I am using TdCalendarView code by Tinyfool in my project in which all calendar is designed using core graphics.I want to color rows of this calendar with two alternate colors.How can I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:39:42+00:00Added an answer on May 23, 2026 at 6:39 am

    You need to change the stroke fill color here for either even value of i in for loop or odd value

    -(void)drawDateWords
      {
    CGContextRef ctx=UIGraphicsGetCurrentContext();
    
    int width=self.frame.size.width;
    
    int dayCount=[self getDayCountOfaMonth:currentMonthDate];
    int day=0;
    int x=0;
    int y=0;
    int s_width=width/7;
    int curr_Weekday=[self getMonthWeekday:currentMonthDate];
    
    // Normaly big Font
    [array_Date addObject:@""];
    [array_Month addObject:@""];
    [array_Year addObject:@""];
    [array_Desc addObject:@""];
    [array_LastDate addObject:@""];
    [self.array_Name addObject:@""];
    
    
    UIFont *weekfont=[UIFont boldSystemFontOfSize:20];
    
    for(int i=1;i<dayCount+1;i++)
    {
        day=i+curr_Weekday-2;
        x=day % 7;
        y=day / 7;
        NSString *date=[[[NSString alloc] initWithFormat:@"%d",i] autorelease];
    
        for (int j=0; j<[array_Date count]; j++) {
    
            NSString *date1 = [array_Date objectAtIndex:j];
            int month1 = [[array_Month objectAtIndex:j] intValue];
            int year1 = [[array_Year objectAtIndex:j] intValue];
    
        if ([date isEqualToString:date1] && currentMonthDate.month == month1 && currentMonthDate.year == year1)
        {
            //[@"*" drawAtPoint:CGPointMake(x*s_width+18,y*itemHeight+headHeight+18) withFont:[UIFont boldSystemFontOfSize:25]];
            //[date drawAtPoint:CGPointMake(x*s_width+18,y*itemHeight+headHeight+18) withFont:[UIFont boldSystemFontOfSize:25]];
            [[UIColor redColor] set];
    
    
        }
        else{
            //[[UIColor redColor] set];
            [date drawAtPoint:CGPointMake(x*s_width+15,y*itemHeight+headHeight) withFont:weekfont];
        }
    
        }
    
    if([self getDayFlag:i]==1)
        {
            CGContextSetRGBFillColor(ctx, 1, 0, 0, 1);
            [@"." drawAtPoint:CGPointMake(x*s_width+19,y*itemHeight+headHeight+6) withFont:[UIFont boldSystemFontOfSize:25]];
        }
        else if([self getDayFlag:i]==-1)
        {
            CGContextSetRGBFillColor(ctx, 0, 8.5, 0.3, 1);
            [@"." drawAtPoint:CGPointMake(x*s_width+19,y*itemHeight+headHeight+6) withFont:[UIFont boldSystemFontOfSize:25]];
        }
    
        CGContextSetRGBFillColor(ctx, 0, 0, 0, 1);
    }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this code, the following execution yields strange results: C 100 R W The
Using JDeveloper , I started developing a set of web pages for a project
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
Using NSDateComponents I know how to get the day component, but this gives me
Using MVC2 I have an AJAX form which is posting to a bound model.
using a binary search tree I need to add to a vector all int
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.