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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:12:46+00:00 2026-06-11T13:12:46+00:00

I use something similar to android toast to send messages to the user. This

  • 0

I use something similar to android toast to send messages to the user.

This toast is shown in the current view, in this case I want to change the view, and there is no time to read the message.

So, I use a thread to stay in the current view for 3 seconds, but the toast is also delayed.

[theHoleView makeToast:@"OK!!" duration:3 position:@"center" image:[UIImage imageNamed:@"nocorrect.png"]];
[NSThread sleepForTimeInterval:3];
[self.navigationController popToRootViewControllerAnimated:YES];

I execute NSThread after the Toast, why is the toast delayed?

Thank you 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-06-11T13:12:47+00:00Added an answer on June 11, 2026 at 1:12 pm

    It’s because you haven’t got back around the main loop which draws the screen. You can flush the graphics context with [CATransaction flush], ie

    [theHoleView makeToast:@"OK!!" duration:3 position:@"center" image:[UIImage imageNamed:@"nocorrect.png"]];
    [CATransaction flush];
    [NSThread sleepForTimeInterval:3];
    [self.navigationController popToRootViewControllerAnimated:YES];
    

    You might need to add the Quartz framework for this to work, make sure the framework is added to the target and import the header in your ViewController.m file. ie:

    #import <QuartzCore/QuartzCore.h>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know anyway to use something similar to polygon.getKml() except for the current
Is it possible to use (Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI); or something similar to access a res/raw file
I want to make a http request with android. is use this: void testHTTP()
im trying to do something similar to this: android: how to listen to "sd
I am trying to do something similar to this but in Android. In Android
How do I use something similar to the example below, but with the opposite
I am looking for a way to use a UILabel (or something similar) to
What is the proper way to use mysql TIMEDIFF, (or something similar)? In database
I use something like this to click an element on a page by condition:
I want to use something like: ContourPlot [Abs[z-1] == 2] and to define z

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.