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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:14:08+00:00 2026-05-26T00:14:08+00:00

I’m a web developer tasked with building a basic iOS app for internal use.

  • 0

I’m a web developer tasked with building a basic iOS app for internal use. A number of functions in the app require authentication, and I’ve successfully built the login view/controller which calls a webservice, authenticates the user etc etc.

I can currently load the “LoginView” with a button click and after authenticating the user, dismiss the view from the view stack returning to the original view, now with established credentials. None of that is my issue.

Now I’m looking for the equivalent of doing a ‘redirect’ as I would in developing for the web. I need to load the LoginView from any function in my application where authentication is required, and on success, load some other view which would be “passed in” (on the web I would provide a redirect Url) to the LoginView. I feel like this is a simple thing, and must be done all the time, but can not find a good example or explanation of this. I’m certain my obvious newbiness is preventing me from even searching for the right terms.

Hopefully someone can decipher my poor, yet best attempt at explaining what I am looking for. 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-05-26T00:14:09+00:00Added an answer on May 26, 2026 at 12:14 am

    This is the perfect job for delegates. In your login view controller interface (please note I’m writing this off the top of my head so there might be a few typos/missing semi-colons etc:

    @protocol LoginControlDelegate <NSObject>
    - (void)loginDidSucceed:(BOOL)success
    @end
    
    @interface ...
    {
        ...
    }
    
    @property (nonatomic, assign) id<LoginControlDelegate> delegate;
    
    @end
    

    And then in your implementation file, once you have established that the webservice has responded to the login request, you can call:

    if (self.delegate != nil)
         {self.delegate loginDidSucceed:<YES/NO depending on the webservice response>]
    

    So every time you create an instance of your login view controller, you can assign the “parent” view controller as the delegate and then conform to the <LoginControlDelegate> by implementing the method loginDidSucceed:

    LoginViewController *vc = [[LoginViewController alloc] init....];
    vc.delegate = self;
    [self presentModalViewController:vc animated:YES];
    [vc release];
    

    And the loginDidSucceed method:

    - (void)loginDidSucceed:(BOOL)success
    {
         if (success)
         // Logged in successfully, push the appropriate view
         } else {
         // Login failed...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload

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.