StackFlowed
StackFlowed

Reputation: 6816

UINavigationController with in UITabBarNavigationController doesn't load the table data

Im extremely new to IOS.

I have a UITabBarNavigationController inside it I have an UINavigationController I have a problem, The UINavigationController Doesn't load the table values (as in i have put all the methods and stuff for the datasource and mapped it in IB but it still doesn't seem to work)

For code click here

PS : When you run the project it will ask you for a username and a password please enter user1 for both.

Thanks for your help.

Upvotes: 0

Views: 123

Answers (1)

makaron
makaron

Reputation: 1615

There's really a lot of stuff I would notify you about, man. But to be closer to your very question (I explored only the first tab, the others should be resolved in a similar way):

  1. You have warnings in the interface builder. Maybe in the code in some cases you can ignore them, but not in IB. I corrected it and (not just after that) it worked (leave your email in comment if you want me send it to you). But I would advise you to spend 20 mins on watching this video.

  2. The code which initializes your tableView works before the user is even logged in (so that it's being initialized with nothing), therefore, even if all the rest of code is working, you will see the items in your tableView only after you reinitialize your tableView (e.g. change the tab and go back to your first one "Appointment" tab).

  3. In the class AppointmentTable move your code from viewDidLoad to viewWillAppear or viewDidAppear (the last ones work every time you show your tab on the screen).

P.S. Leave your email in comment so I could send you corrected (not fully of course, but only in the places I pointed out) version of your project.

Upvotes: 1

Related Questions