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 7516109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:01:54+00:00 2026-05-30T01:01:54+00:00

Im developing a calender based application and in that my client need to set

  • 0

Im developing a calender based application and in that my client need to set a image on the particular date user selects.

For example if i select 1 and 20,an image is to be set on both the dates.

For now i can set the image only for one date i.e if i select 1 the image is set on that date and when i select 20 the image set on 1 will disappear and image will set only for 20.

Can anyone please help me how to do this.

Thanks in advance.enter image description here

  • 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-30T01:01:57+00:00Added an answer on May 30, 2026 at 1:01 am

    I finally find a solution for this.I done in the method and you experts can suggest a better way for this.

    - (void)selectButtonForDate:(NSDate *)aDate {
    
    
    
        if (selectedButton >= 0) {
            NSDate *todayDate = [CalendarLogic dateForToday];
            UIButton *button = [buttonsIndex objectAtIndex:selectedButton];
    
            CGRect selectedFrame = button.frame;
            if ([selectedDate compare:todayDate] != NSOrderedSame) {
                selectedFrame.origin.y = selectedFrame.origin.y + 1;
                selectedFrame.size.width = kCalendarDayWidth;
                selectedFrame.size.height = kCalendarDayHeight;
            }
    
            button.selected = NO;
            button.frame = selectedFrame;
    
            self.selectedButton = -1;
            self.selectedDate = nil;
        }
    
        if (aDate != nil) {
            // Save
            CGRect dayFrame;
            NSDate *dayDate;
            NSInteger numberOfWeeks = 5;
       //     NSCalendar *calendar = [NSCalendar currentCalendar];
           // NSDateComponents *components = [calendar components:(NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit) fromDate:[NSDate date]];   
       //     NSDate *todayDate = [calendar dateFromComponents:components];
    
            for (NSInteger aWeek = 0; aWeek <= numberOfWeeks; aWeek ++) {
                CGFloat positionY = (aWeek * kCalendarDayHeight) + 60;
    
                for (NSInteger aWeekday = 1; aWeekday <= numberOfDaysInWeek; aWeekday ++) {
                    CGFloat positionX = ((aWeekday - 1) * kCalendarDayWidth) - 1;
                    dayFrame = CGRectMake(positionX, positionY, kCalendarDayWidth, kCalendarDayHeight);
                    dayDate = [CalendarLogic dateForWeekday:aWeekday 
                                                     onWeek:aWeek 
                                              referenceDate:[name referenceDate]];
                //  NSLog(@" %@ todaydate [datesIndex objectAtIndex:[sender tag] %@",todayDate,[datesIndex objectAtIndex:[sender tag]]);
                  //  NSDate *mmm = [datesIndex objectAtIndex:[sender tag]];
                    if ([dayDate isEqualToDate:aDate]) {
                         NSUserDefaults *currentDefaults = [NSUserDefaults standardUserDefaults];
    
                        flag = 1;                 
                        [n addObject:[NSValue valueWithCGRect:dayFrame]];
    
    
    
                        [currentDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:n] forKey:SaveMonth];
                        [currentDefaults synchronize];
                }
    
    
    
                }
            }
            if(flag == 1){
    
                flag = 0;
                for (int i=0;i<[n count];i++){
    
    
                    UIImageView *im = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"call.png"]] ;
                    CGRect myRect = [[n objectAtIndex:i] CGRectValue];
    //                NSLog(@"n is %@",n  );
    //                NSLog(@"frame 111111111111111  = %@\n", NSStringFromCGRect(myRect));
    
                    im.frame = myRect;
                    [self addSubview:im];
    
    
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a browser application that is sensitive to the current date. Throughout
I am developing alarm application for that I need to invoke alarm repeatedly for
I'm developing a Django application that contains a model with a date/time field. On
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
Developing a C# .NET 2.0 WinForm Application. Need the application to close and restart
I am currently developing an order system where the user can select which day
I'm developing a web application that provide a service of online reservation, and I
I'm developing a web application that involves the use of timestamps. I would like
Hi i am new to android i am developing alarm application for that i
I am developing an application which needs the current date from the device, but

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.