Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Self-Destructing Message iPhone App Using Parse.com as a Backend and Adding Users Logging In and Logging Out

Sara Strickler
Sara Strickler
3,221 Points

Storyboards are different from video version, and Initial View Controller that is loading is showing tab bar...

I'm totally stuck, due to the new storyboards, again. Have searched the forums for this answer, as well as SO, and have tried two other Storyboard tutorials, but I'm still not sure what's going on.

I was able to follow along for the most part, and everything was ok. Had some major issues with auto-layout, etc, but resolved them. Here are my issues:

When I build and run, my app shows a table view with the tab bar controller. I can change this by making the LoginViewController the Initial View Controller, but this does not actually solve my problem - I get stuck between the Login and Signup screens.

I'm really frustrated by the differences in Storyboards, and the lack of clear information online. The issue seems to be with putting the nav controller inside of the tab bar controller, and confusion about which scene should be the "initial view controller". Any help or insight you could provide, I'd greatly appreciate.

Here is my project: https://www.dropbox.com/sh/dgh95i8lntv5qoz/AADmixUXfw6ZE_yaZ6YBa0Ifa?dl=0

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Hey Sara, sorry for your trouble! This course was created with iOS 6 using Xcode 4.6, and unfortunately Apple's updates have caused us some grief. Most of the concepts still apply, though some specific things are now done slightly differently. We are trying to balance refreshing old courses and working on new ones, which is a challenge!

So about your specific problem...I was able to run your project and back and forth between the Login and Signup view controllers. Can you give me more details about it?

Regarding the back navigation to the empty table view...we take care of that at the 9:30 mark in this video. Your project doesn't have the extra code needed to hide that back button.

Sara Strickler
Sara Strickler
3,221 Points

Thanks so much for your response Ben - I was able to fix the problem, but to be honest, I'm not sure how... I toggled "initial view controller" on and off several times, on several of the view controllers, and it started working correctly... I do have a new problem now though - I've hidden the back button, but when the app loads initially, the pesky back button is there... If I go through the login/logout flow, it doesn't show up, so it's only when the loginViewController loads initially... Any ideas? I appreciate your help!

https://www.dropbox.com/sh/dgh95i8lntv5qoz/AADmixUXfw6ZE_yaZ6YBa0Ifa?dl=0

Ben Jakuben
Ben Jakuben
Treehouse Teacher

I was able to fix the problem, but to be honest, I'm not sure how

haha - spoken like a true programmer!

I'll take a look at your code tonight or tomorrow morning and see if I can help troubleshoot. I'll compare with my code that doesn't have that issue. If you want to compare, check the "Project Files" link in the "Downloads" tab under the video.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Oh, that's another issue introduced with a newer version of iOS. Sorry! Put these two lines of code in viewDidLoad of InboxViewController and you should be good:

self.navigationItem.hidesBackButton = YES;
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:self.navigationItem.backBarButtonItem.style target:nil action:nil];
Sara Strickler
Sara Strickler
3,221 Points

Thanks Ben! I had found the first line on stackoverflow, but your answer helped me totally squash the problem.

Any chance you could look at my other forum post - I've been stuck for a few days now: https://teamtreehouse.com/forum/uiimagepickercontroller-is-not-being-dismissed-properly