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?
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.
Related
I am building an Onboarding/Welcome screen for my app, but the problem is that my app has a tab bar, so my Onboarding somehow interferes with that and doesn't look like a seamless interface. My solution is to put the Onboarding thing on a separate view controller and once a user is done with that screen, it presents the navigation controller and all of ITS views. I have done some research on this, but I'm still lost. If you have any other ideas, or have solutions, please let me know, thanks.
Here is what I want to achieve:
In order to do this in a way that looks nice and works well you should not be pushing or presenting the tab bar but updating the root view controller of the whole window.
I can’t provide a code example right now but there will be several online sources for this.
You should be changing the view controller so it essentially toggles the app between “logged in” and “logged out”.
That way you don’t have to worry about how to get from one to the other. They act separately just dealing with their own stuff.
I am making an app that has multiple view controllers that has a side view that you can go to navigate to each one, etc. I have everything set up and you can navigate to the side view by swiping from left to right to revealViewController, and that works splendid; however, what I would also like as well is to have a button that looks like 3 rectangles (not important to this, as I already designed the button) like on most apps, that you click and it would take you to that side view as if you where swiping like I have it set up right now. Does anyone know how to do this? I know it's pretty easy, but I am not quite sure.
An example of what I am trying to do, is in the Chase Mobile App. Even though this is a function that is in MANY different apps.
This is EXACTLY what I am trying to do in the example/image above
All help is gladly appreciated!!
I need to have that button open up the side menu just like this. Right now I have it were you slide from one side to the other to get this.
Please try this code to toggle the sideview appear and disappear as :
[self.revealViewController revealToggleAnimated:YES];
and
-(void)backButtonPressed {
[self.revealViewController rightRevealToggleAnimated:YES];
[self.navigationController popViewControllerAnimated:YES];
}
This is called a hamburger menu (or sidebar menu) and is typically frowned upon for iOS design. There are a number of reasons for this, but they are still used in many applications. Basically, they hide links and information from the user that should be quickly accessible.
Disney recently recreated the navigation in their Disney World app. Previously they used this method to navigate the app, but they changed it up pretty well. I personally like the change and that they were able to fit a large amount of information and features into their app without a sidebar.
While I don't recommend using this design, it is a great method to learn if only to better understand making custom views. There are many tutorials that will help you set this up online. A good example is at Appcoda.
Basically, you will need a root view controller with two views in it: the menu and the content. You will switch the content view controller with the view that is selected and active in the menu. You can show and hide the menu a number of ways, but one of the easiest is to move the menu left or right to place it in the frame or out of the frame. The tutorial linked above will get you pretty far. I would have gone into more detail, but there are so many resources regarding this that I don't see the point in copy/pasting it here.
What I ended up doing was from each tableView cell, instead of connecting it straight to the view I want it to show when you click that table cell, I had it go to a navigationaController with a segue (reveal view controller push controller) and then from that NavigationController I connected it to the view that I wanted it to display and connected it to that view controller by having a segue (root view controller), and then having the button in each view, and in each of the files .swift for those view controllers I connected the button up as you normally would, and for the code inside of the ViewDidLoad I have "menuBars.target = self.revealViewController()" and "menuBars.action = #selector(SWRevealViewController.revealToggle(_:))"
I have made various attempt to go storyboard only and limit my code when it comes to UI. Everytime I was getting stuck and reverting back to code. Since the release of XCode 6 and the new iPhone that have multiple screen sizes it make more sense that ever to go Storyboard only.
This time I am stuck on the following scenario. I want to create a custom search view controller that will have 2 states:
Search State. It will prompt the user for a keyword to search.
Result State. It will display the results to the user.
I am aware that this can be accomplished using the UISearchController, but the customer wants to customise the behaviour. Currently I have two view controllers and a push/show segue between them. I would like to replace that with one view controller and animate the display of the results.
Is there any way that storyboard can accomplish that. I am thinking of creating two view controllers (in storyboard) with different layouts. Both will be linked on the same class. I could create a segue between them, but then I will lose all the variable stored inside them and will not be able to animate between them.
On the transition between the two states some UI elements will be hidden and some others will be moved. I would like that to be animated.
I know how to do that in code without using storyboard, but then I will have to cover all different screen scenarios. I hope there is an alternative way.
You can do this with two view controllers, and set a segue between them. The trick is that the animation bit will have to be done in code, unless you write a custom UIStoryboardSegue to handle the animation.
I'm at a point in the development of the app I'm working on where in order to complete the assignments given to me, it seems like the best way to accomplish what I need is to combine a UINavigationController with a UITabBarController.
Structurally, the app has a home page, and the rest of the app is navigated through the UITabBarController. This is a sound design for the original, but when I took over the development process of this, I had to make a lot of additions to the app, and there's technically supposed to be a "second" section which adds extra "features" if you will that aren't necessarily related to the main functionality of the app itself.
Basically, since everything begins at the Overview, the user is supposed to have a choice between just diving into the app itself, or using some of these extra features. I'm thinking the Navigation Controller would be fitting for the extra features, but I'm not sure how I can add to it.
What I need to know is - is this solution to the problem sound? If so, what's a good way to accomplish this? Is it ok to have a separate UIWindow class to link the Navigation Controller up with the TabBar Controller?
Granted, this app has used a lot of nib files, and every time I've tried to do something programmatically, it just hasn't worked. Thus, if someone could point out a NIB method of achieving this, I'd appreciate it.
According to Apple recommendation, UITabBarController should always be the root view controller of your app. So basically your main view is just one tab of your tab view controller, and so you just need to embed your main view controller in a navigation controller. This way you can navigate to whatever page you wish within that tab using the navigation controller, or you can go to other tabs using the tabbar controller.
I am creating a login type functionality for my iphone app. I've laid the whole thing out in storyboard. I have set a condition that keeps the user logged in for a day. Then after that, the application should direct them to the initial view controller (a page where they have to enter login credentials).
I was planning on putting this logic in the AppDelegate (app did load). If there is a better place to put this logic, I'd be open to that. But how do i access and load the initial view controller in my storyboard?
The reason I can't just load a segue to this initial view, is because I won't necessarily know where the user last left the application. And i don't want to create individual segues from each view back to the initial view.
Thanks!
EDIT! In response to Luis's answer
Okay, great! I added a navigation controller at the beginning of my starboard, like the first character suggested. Now, I'd like to go back to the navigation controller every time I open, or re-open the app, so that the navigation controller's logic executes. Thanks
Read both of the answers provided for this question, the first approach is easier but you have to do what you just wrote you didn't, the second one is what you are looking for but its way more complicated.
iOS 5 storyboard, programmatically determine path