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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:22:16+00:00 2026-05-29T05:22:16+00:00

I am presenting a tableview where users can select in which calendar to put

  • 0

I am presenting a tableview where users can select in which calendar to put an event. In iOS 5 I use the new EKCalendarChooser but in order to accomodate those who don’t update I am making my own calendarchooser.

To get the calendars on the phone I use this:

- (void)viewDidLoad 
{    
    [super viewDidLoad];        
    [self setWritableCalendars:[self getAllWritableCalendars]];
}


- (NSArray *)getAllWritableCalendars
{
    EKEventStore *eventDB = [[EKEventStore alloc]init];    
    NSMutableArray *allCalendars = [NSMutableArray arrayWithArray:[eventDB calendars]];
    NSPredicate *filter = [NSPredicate predicateWithFormat:@"allowsContentModifications == YES"];
    [allCalendars filterUsingPredicate:filter];

    NSArray *_writables = [NSArray arrayWithArray:allCalendars];

    return _writables;
}




- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }

    if ([[self writableCalendars] count] > 0)
    {
        cell.textLabel.text = [[[self writableCalendars] objectAtIndex:[indexPath row]] title];
    }
    else 
    {
        cell.textLabel.text = @"No calendars found";
    }
    return cell;
}

The problem is that the even though the writableCalendars has two objects, the [[[self writableCalendars] objectAtIndex:[indexPath row]] title] is nil ever time. The tableview is presented with two cells that is clickable but with no text.

When I force this code to run in iOS 5, it works fine and all calendar titles are presented.

What am I missing 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-29T05:22:18+00:00Added an answer on May 29, 2026 at 5:22 am

    From that code I wrote down following code

    EKEventStore *eventDB = [[EKEventStore alloc]init];    
    NSMutableArray *allCalendars = [NSMutableArray arrayWithArray:[eventDB calendars]];
    for (int i=0; i<allCalendars.count; i++)
    {
        NSLog(@"Title:%@",[[allCalendars objectAtIndex:i] title]);
    }
    

    Output:
    2012-02-03 17:47:31.099 FunDoc[4100:11f03] Title:Calendar
    2012-02-03 17:47:31.100 FunDoc[4100:11f03] Title:Birthdays

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

Sidebar

Related Questions

When presenting preformatted text on the web (e.g. code samples), line wrapping can be
I'll use the jQuery plugin for presenting the user with a nice interface The
I'm using a pretty standard recipe for presenting ModalViewControllers in my iPhone apps, but
I am presenting Git to a 10 man programming team who currently use Visual
I'm presenting a ViewController modally. How can I access the parent view controller ?
i am testing all day on this but i can not get it to
Web presenting a website in a UIWebView, the user can touch links. When testing
Has Presenting modal view controller in iOS 4.3 for iPad changed? I created a
I am presenting the user with some exam. Users are not to proceed into
I'm presenting data for users in a grid (ExtJS) with remote sorting and paging.

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.