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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:19:54+00:00 2026-05-28T15:19:54+00:00

My app has three states: A) connected to server B) connected to wifi, but

  • 0

My app has three states:

  • A) connected to server
  • B) connected to wifi, but no internet
  • C) no connection

The first state is the default mode of operation of the app, and the other two (B & C) are presented as modal view controllers. On various reachability changes, the correct modal view should appear.

Unfortunately, in certain cases B & C both attempt to be presented at the same time, or B is currently presented and may be a millisecond away from closing, but C is already trying to show itself.

My hack of a solution is to basically create a semaphore with some delegates for each modal view- when a modal view opens, it sends a message via the delegate to go to the main view to turn a flag on. Then when the second modal view tries to open, it sees the first is on and waits until it is off. That seems like a ridiculous hack for me trying to make a very basic state machine.

Any thoughts?

  • 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-28T15:19:55+00:00Added an answer on May 28, 2026 at 3:19 pm

    I’d collapse the separate B & C cases into a single view controller that changes its view based on whether B or C is happening at any given moment. That way you don’t have them competing, because there’s only ever one view controller.

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

Sidebar

Related Questions

My app has three text fields: 1) Username // Initialization code usernameTextField = [[UITextField
I am creating an app that has three tabs on the main screen. Each
I'm working on a rewrite of an app that has three categories of users
My app has the ability to store passwords. But these are important passwords, so
I'm writing a WinForms app which has two modes: console or GUI. Three projects
I've put a little app together that has three tabs to show three different
My app has a screen where it is constantly polling a server for information.
In my app I have three tables: Users Profiles Friends The User has one
My app has a registered shutdown function and it seems there's some issues with
Is there a way to get a system notification when an app has been

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.