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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:25:31+00:00 2026-05-25T01:25:31+00:00

Sorry if my question does not match the title, but i think it does:

  • 0

Sorry if my question does not match the title, but i think it does:
I have an app with a navigation controller and 3 views. It’s an app where you connect to a server and talk with friends.
The thing is, my rootViewController, the login screen, calls the second view witch is the friends list. clicking in a friend on the list takes you to the third view, the chat screen itself.
I wanted to, when the user logs in (rootview), to store the user name used in a variable, so i could use it on the third view, the chat screen, so when he sends a message it can have his name on it, and while retrieving info from server, i can use his name as a parameter too.
By the way, is SQLite the best way to save messages and users? I am afraid of Core Data =/

  • 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-25T01:25:31+00:00Added an answer on May 25, 2026 at 1:25 am

    To keep things loosely coupled I would consider just passing along the userName when instantiating each UIViewController sub class. (Makes unit testing easier as well)

    e.g.

     // LoginViewController -> user logs in
     FriendsViewController *friendsViewController = [[FriendsViewController alloc] initWithUserName:userName];
     [self.navigationController pushViewController:friendsViewController];
     [friendsViewController release]; friendsViewController = nil;
    
     // FriendsViewController -> user selects a friend
     ChatViewController *chatViewController = [[ChatViewController alloc] initWithUserName:userName];
     [self.navigationController pushViewController:chatViewController];
     [chatViewController release]; chatViewController = nil;
    

    Don’t be afraid of core data there are plenty of excellent books out there.

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

Sidebar

Related Questions

Sorry about the vague question title, but I have these typedefs here: typedef std::list<AnimationKeyframe>
Sorry if this question is too vague, but I'd rather not muddy it's point
This is not the clearest of question titles, sorry about that, but I will
Sorry to be posting this question. :( But I have spent almost the entire
[I'm sorry that this isn't directly a programming question. But I have recently switched
Sorry, if the question does not clarify exactly what i need....Please read ahead for
I am sorry, if this question sounds stupid, but I have searched a lot
I'm sorry for the generic title of this question but I wish I was
I am sorry if my question does not make any sense. So here is
Maybe the title does not word the question so precisely: I know that when

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.