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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:34:44+00:00 2026-05-26T13:34:44+00:00

Am very new to iPhone application development. Am adding the events to iCal from

  • 0

Am very new to iPhone application development. Am adding the events to iCal from my iphone app. The user can add multiple events at a time to iCal from the app. If the user add above 50 events to iCal, the event does not adding in iCal and the app getting crash. So, i want to avoid the app crash. So, i planned to delay the adding event to iCal inside the for loop(While the loop is in running state). How can i pause the For loop running and continue the for loop after 10 sec’s delay. Meanwhile the for loop should continue after 10 sec’s from where it was paused. How can i do this? Any ideas? Please help to solve my problem? Thanks in advance.

  • 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-26T13:34:44+00:00Added an answer on May 26, 2026 at 1:34 pm

    The best way to do what you’re after is an NSOperationQueue but it’s a bit technical. Something like this might be easier to understand:

    Header:

    NSMutableArray *events;
    

    When you specify your list of events:

    events = /*....*/;
    [self nextOp];
    

    The nextOp method:

    -(void)nextOp {
        // Do 10 events at a time.
        int stop = MIN(10,[events count]);
        for (int i = 0; i < stop; i++) {
            //Add [events objectAtIndex:i] to iCal
        }
    
        // Remove these processed events.
        [events removeObjectsInRange:NSMakeRange(0,stop)];
        if ([events count] > 0) {
            // We've still got more events to go, so schedule our next call
            [self performSelector:@selector(nextOp) withObject:nil afterDelay:10];
        } else {
            [events release];
            events = nil;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an iPhone application, and I very new on iPhone development. I've created
I'm very new to iPhone development. I want to create a utility application much
I am very new to iphone application development and am struggling to create a
I am very new new to iPhone app development and not able to correct
I am very new to Android development. I am converting my iPhone app to
i am very new to iphone Development and i am asked to use nsxml
I'm very new to iPhone development so please bear with me. I'm following the
I'm very new to iphone programming. I'm trying to write an application where I
I've been playing around with upgrading from an iPhone app to a Universal application,
I am new to iPhone application development so that i want to learn cocoa

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.