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 =/
Sorry if my question does not match the title, but i think it does:
Share
To keep things loosely coupled I would consider just passing along the
userNamewhen instantiating eachUIViewControllersub class. (Makes unit testing easier as well)e.g.
Don’t be afraid of core data there are plenty of excellent books out there.