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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:33:54+00:00 2026-05-26T08:33:54+00:00

In my app there is authentication required, so when you launch one of the

  • 0

In my app there is authentication required, so when you launch one of the tabs on tab bar, “class A” checks are there credentials saved if not, “class B” modal view controller with fields to login launches.

So my question is : in which method in class A (loadView, viewWillAppear or maybe in another one) should be implemented checking if there are credentials saved and other stuff described above.

And my additional second question is:
is pushing modalviewcontroller correct way to show login screen, or i should do that differently?

Thank you for reply guys.

OH ! One More Thinh

And one more thing. I’ve done implementing LoginView by adding delegate and presenting ModalVC (Harkonian the Piquant’s method). But in my tab bar app i have got very confusing problem. I mean when user taps login button (assume that everything was correct and he’s able to secured data) how PROPERLY switch to tab where is secured info. I mean previously selected tab.

i did it by adding in

-(IBAction) login {

//some code

self.tabBarController.selectedIndex =1;

And it seem to work good but is it correct ?

  • 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-26T08:33:54+00:00Added an answer on May 26, 2026 at 8:33 am

    I have a very similar use case in my app — it requires a passcode to authenticate. After a lot of testing and tweaking I found the following design to be the best approach:

    Don’t use class A to launch your credentials VC — use the app delegate instead.

    For security purposes, typically you’ll want the credentials VC to show before the user can view the underlying view. It’s much easier to handle this in the app delegate than in a VC. In addition, you need to consider what happens when your app is backgrounded — a screen shot is taken of the current state of the app. If you are using viewController A to show the credentials view, when the app relaunches the user will be able to see whatever sensitive information was visible on app close until the app finishes launching and VC A presents the credentials VC.

    Don’t insert your credentials view into an existing ViewController — use a new UIWindow instead.

    You don’t ever want any other view to be able to sit on top of your credentials view. Ever. Even views that would normally always be on top, like UIAlertView. The easiest way to achieve this is to have a special UIWindow just for your credentials view. Show this window and hide the primary app window whenever you need to display the credentials view.

    How does this approach look in practice?

    If you are at all interested in how well this design works, you can check out the passcode feature in Audiotorium Notes for iPad. I spent a lot of time with this design to make sure it was as secure as possible.

    If you have any specific implementation quests feel free to ask and I’ll try to answer them.

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

Sidebar

Related Questions

On one box there is a running java server I create. Another app allows
I have one particular request in my app that requires Basic authentication, so I
What is the best authentication app for Django that: has configurable required fields, for
In my app there is a webview with an advertising html page in it.
In my app there is requirement that..I have 6 buttons in a nib, when
In my app there is a button, user just click it then the latest
In my app there is the view says googleBtn. If i press on it
Hello i am using SocializeActionBar for my app there i have multiple links. I
I'm coding an app that works much like Apple's Weather.app: There's a UIPageControl at
When hosting WPF user controls within a WinForms MDI app there is a drawing

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.