0

I'm trying to build an app that has lots of similarities to the Facebook App in terms of the "Storyboard". I'm tempted to do everything in code as I know best but I'd really like to figure out how to storyboard these more complicated UI's.

The Facebook App starts with a login view. When you log in, you get a tab view. In the main tab view, you have a table view. Within each table view are a user, post, and comment buttons which push to a new view.

So the way I am understanding it is we have UINavigationController with the .navigationBarHidden set to false. The first view controller here is the loginViewController. When the login button is pressed and the user is logged in, we performSegueWithIdentifier to a UITabBarController. The first tab is a UINavigationController with a UITableViewController as the first view controller. Clicking user, post, or comment pushes the appropriate view controller onto the NavigationController.

This all begins to seems a bit more complicated than just writing this all out in code. I'm also not even sure this implementation is correct with all these nested view controllers. I'm not sure this is all possible with storyboard as well: for example a navigation controller for pushing to comment, user, or post views doesn't seem possible with storyboard.

I'd like to know the correct way of implementing this kind of UI design. And should / could this be implemented using Storyboards?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Chet
  • 18,421
  • 15
  • 69
  • 113
  • It sounds like you're on the right track. It's been my experience that storyboards get really painful to use as your app grows (especially when you combine with git). Creating those segues from post, comment, etc. will be pretty simple though. You just use the push segue. – AdamPro13 Jul 28 '14 at 22:00
  • I'm starting to realize all these awful circular push segues as well. Given the ListView, UserView, CommentView, PostView, the ListView points to all three. But you can get to the UserView from CommentView or PostView. And you can get to CommentView from PostView as well. And you can probably get to PostView from UserView as well. Dang. I don't know how this is managed... – Chet Jul 28 '14 at 22:10
  • I'm willing to bet it's all programmatic or done with xibs. – AdamPro13 Jul 28 '14 at 22:18
  • Storyboards are great for defining the layout of your views and having all viewControllers in one place, but it's not necessarily the best for defining navigation. Segues can get messy, and sometimes you just can't do somethings with them. Usually I don't even use them. I set a StoryboardID for all my viewControllers and instantiate them programatically. – pedros Jul 28 '14 at 23:05
  • Interesting. So if you have all view controllers in one Storyboard, how do you perform the transitions between them? – Chet Jul 28 '14 at 23:36
  • Something [like this?](http://stackoverflow.com/questions/10522957/call-storyboard-scene-programmatically-without-needing-segue) – Chet Jul 28 '14 at 23:57

1 Answers1

0

Your design team may layout the app using a "storyboard" (physical objects -- not the digital version). Large apps are hard to piece all the little things together on a storyboard. Just too many wires going every which way.

Look at the FB app without internet access and you can see their basic building blocks easier. Its built in units (post at a time) that are added to a scrolled view. Search bar and menus at the top and buttons at the bottom with the scrolled view in the middle. The posts probably have some common base class with various types derived from it (picture, video, links, etc).

There is some sort of background process monitoring the position of the scroll view to dynamically load new stories if you get down within 1/3 of the way to the bottom. Within each post you can see the components if you look closely and think about what sort of block that is.

LawfulEvil
  • 2,267
  • 24
  • 46