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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:17:17+00:00 2026-06-12T20:17:17+00:00

After pressing on a button in a custom tableview cell I perform an asynch

  • 0

After pressing on a button in a custom tableview cell I perform an asynch operation and in the selector callback call:

[self performSegueWithIdentifier:SEGUE_PURCHASE_SEGUE sender:self];

So the next callback is called:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
}

and I can see in log that the new screen’s viewDidLoad and viewWillAppear methods already were called but the next screen will be shown only in several seconds after this.

What problem can be here?

CODE:

-(void) moveToPurchaseScreen{

     NSLog(@"view1 moveToPurchaseScreen");

    [self performSegueWithIdentifier:SEGUE_PURCHASE_SEGUE sender:self];
}

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

    NSLog(@"view1 prepareForSegue");
//    
//    BSPurchaseViewController *purchaseViewController = [segue destinationViewController];    
//    purchaseViewController.pngImage = [BSSharedObject getInstance].createdImage;
////    [[BSPopupManager getInstance]closeWaitingPopup];
//    
//    
//     NSLog(@"2");
}

-(void)viewDidDisappear:(BOOL)animated{
    NSLog(@"view1 DidDisappear");
}

2012-10-10 21:51:15.644 BarneyShop[4961:11603] view1 moveToPurchaseScreen
2012-10-10 21:51:15.646 BarneyShop[4961:11603] view1 prepareForSegue
2012-10-10 21:51:15.647 BarneyShop[4961:11603] view2 viewDidLoad
2012-10-10 21:51:15.648 BarneyShop[4961:11603] view2 viewWillAppear
2012-10-10 21:51:23.812 BarneyShop[4961:f803] view1 DidDisappear

EDIT 2:

[purchase initPurchase: self withSelector:@selector(moveToPurchaseScreen)andProduct:product];


-(void) initPurchase:(id)object withSelector:(SEL)selector andProduct:(Product *)product{

    [operationQueue cancelAllOperations];

    NSInvocationOperation *downloadImageOperation = [[NSInvocationOperation alloc] initWithTarget:[BSImageDownloader getInstance] selector:@selector(downloadImageSync:) object:URL_DOWNLOAD_IMAGE];

    NSInvocationOperation *createImageOperation = [[NSInvocationOperation alloc] initWithTarget:[BSImageCreator getInstance] selector:@selector(createImage:) object:product];

    NSInvocationOperation *saveImageOperation = [[NSInvocationOperation alloc] initWithTarget:[BSImageSaver getInstance] selector:@selector(saveImageAsPng:) object:nil];

    NSInvocationOperation *callbackOperation = [[NSInvocationOperation alloc] initWithTarget:object selector:selector object:nil];

    [createImageOperation addDependency:downloadImageOperation];
    [saveImageOperation addDependency:createImageOperation];
    [callbackOperation addDependency:saveImageOperation];

    [operationQueue addOperation:downloadImageOperation];
    [operationQueue addOperation:createImageOperation];
    [operationQueue addOperation:saveImageOperation];
    [operationQueue addOperation:callbackOperation];    

}
  • 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-12T20:17:18+00:00Added an answer on June 12, 2026 at 8:17 pm

    In your method:

    -(void)viewDidDisappear:(BOOL)animated {
    
        [super viewDidDisappear:animated]; // <-- Try adding this.
    
        NSLog(@"view1 DidDisappear");
    }
    

    Let me know if this speeds up your process. I also noticed that this method gets called from a different thread. Are you calling it manually?

    EDIT

    Try this as well:

    -(void) moveToPurchaseScreen{
    
        NSLog(@"view1 moveToPurchaseScreen");
    
        dispatch_async(dispatch_get_main_queue(), ^{
            [self performSegueWithIdentifier:SEGUE_PURCHASE_SEGUE sender:self];
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do I have to release a a tableView after pressing a button. The tableView
I have created an android custom keyboard. After pressing a button on it, I'd
I am starting another activity by calling startActivityForResult() and after pressing back button my
I have a form in an HTM page that, after pressing the submit button,
I want to change the background color of the window after pressing the button,
I'm trying to make basic functionality after pressing start button start counter , after
What happens is we have a contact sync application. Soon after pressing a button
I'm pushing a scene to the game I'm working on, after pressing a button
I want to animate my UIPickerView after pressing the button. I already have coded
I need to create web-page that has a button. After pressing the button I

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.