I am trying to accomplish a task but not successful even after trying for several days.
I have a tabbar which contains 3 tabs Friends, Chat, Settings.
Friends tab is just a subclass of uitableviewcontroller, when user tap on any user he will be jumped to second tab which is a chat tab.
The second tab(Chat) contains a uinavigationscontroller. This uinavigationcontroller it self contains two views 1> chatting interface, 2> ActiveChats which is a sub class of uitableviewcontroller to show a list of people to whom user is currently chatting with.
What I want is when user is on first tab and select any of her friend to chat she must be jumped on second tab and directly see chatting interface to chat with her friend. Problem is I have to set a root view controller for the navigationcontoller which is going to be pre-initialized but I want that chatting viewcontroller must be initialized every time when user select her friend, I also implemented a method initWithId which must take a selected person id and deliver msg to that particular person and save send & received messages.
part two of the problem, this chatting interface is root view controller but i also want a back button on it so when user tap on it, user will see ActiveChat view. This functionality is similar to WhatsApp, Viber or OneTeam applications.
Please help me out and avoid any silly mistakes i am a newbie. Thank you.
See Question&Answers more detail:os