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

  • SEARCH
  • Home
  • 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 8266113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:02:32+00:00 2026-06-08T05:02:32+00:00

I am using tapku library for displaying calender in my application. I have done

  • 0

I am using tapku library for displaying calender in my application. I have done all date calculations and marked the cells properly acccording to my need but I want to give a different color to the cell according to my choice. I have done marking in single background color but I want to display in three colors. How can I?

  • 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-06-08T05:02:34+00:00Added an answer on June 8, 2026 at 5:02 am

    Look at the method:

    The color is set to [UIColor grayColor] in the drawRect: method (one below in the code). What you can do is check if the date is a date you’re interested in and then change the color appropriately. I’m not sure how you want to differentiate between your dates–it’s your call; in the past, I’ve changed the parameter of the mark argument to something like an int and then basing the color on the int’s value. The mark argument comes from the marks array, so if you pass in an array with different values and then change the method arguments throughout the TKCalendarMonthView, it should be okay.

    For example, lets say you want: mark = 1 –> draw red; mark = 2 –> draw green; mark > 2 –> draw blue.

    - (void) drawTileInRect:(CGRect)r day:(int)day mark:(**int**)mark font:(UIFont*)f1 font2:(UIFont*)f2
    {
    
        NSString *str = [NSString stringWithFormat:@"%d",day];
    
    
        r.size.height -= 2;
        [str drawInRect: r
           withFont: f1
          lineBreakMode: UILineBreakModeWordWrap 
          alignment: UITextAlignmentCenter];
    
        if (mark) {
            if (mark == 1)
                 [[UIColor redColor] set];
            else if (mark == 2)
                 [[UIColor greenColor] set];
            else if (mark > 2)
                 [[UIColor blueColor] set];
            r.size.height = 10;
            r.origin.y += 18;
    
            [@"•" drawInRect: r
                    withFont: f2
               lineBreakMode: UILineBreakModeWordWrap 
               alignment: UITextAlignmentCenter];
         }
       [[UIColor grayColor] set];
    
    }
    

    Hope this answers your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to use the Tapku library to add a calander date picker control
Using the Redis info command, I am able to get all the stats of
Using import datetime in python, is it possible to take a formatted time/date string
Using android 2.3.3, I have a background Service which has a socket connection. There's
I am using Tapku calendar on my project .In the method for selecting a
I am using core data to store objects for my project.There is a date
Using Android TelephonyManager an application can obtain the state of data activity over the
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 Java,I have to fetch multiple sets of values from an XML file to

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.