in my application i have a UISplitView, but before this gets loaded I need to display a page where the user enters some details and then clicks okay to display the spitView. I have tried dragging a view controller from the object library on the right but this gives problems. Please advise me on the right way to approach what I'm trying to do,
Thank you
I would have the splitview present the viewController that collects the user data. Present it modally then dismiss it after they enter the data and the split view will be there for you.
Related
I have been attempting to create a walkthrough for my app although I also have a tab view controller which is the initial view controller. I have been able to identify when a user is opening the app for the first time, but when I make the walkthrough view controller initial, I get a Sigbart error. This is because I set up my tabbar in the app delegate.
Is there a way to possibly keep the tab bar VC the initial and hide the first VC if it is the users first time opening the app?
Is there another way of doing it?
I dont know the code to check of its the flrst time a user opens an app, but why dont you make that check on your tab bar controller? And then lf lt ls the first time, you just change the root vc to the tutorial vc. When they are done with the tutorial you just change back the root vc to the tab bar.
There easiest way to accomplish the tutorial-like behavior for new users is:
1) Make a new View Controller be the initial one.
2) Add code to check if its the first time the user launched the app. If it is, show the tutorial, if its not, show your tab view controller.
3) You can fill this "fake initial" view controller with the same image shown in the splash screen. This way the user will feel its just the splash one.
*) An added benefit of this approach is that you can check other useful things. For example, if your app has some kind of login feature you can manage it here skipping the login window for users who have already logged in. It can also be used to update your app's resources in case you are retrieving them from a server.
I'm currently implementing an app really close to the native Contacts app. The app consists of:
A Master View listing items
A Detail View showing the selected item details
An add button to add an item which:
Allows to take a picture if the camera is available then go to the input view (a form basically). The camera is presented modally.
Directly goes to the input view (the form) is no camera or no authorization. The input view is presented modally.
The QUESTION
When the user presses the OK button after filling the form in the Input View, how can I jump to the Detail View, with the Back Button of the Detail View pointing towards the Master View (and not the Input View where the user comes from) ?
This is exactly the behavior of the native Contacts app, when you add a contact and press OK, you land on the Detail View with the back button leading to the list of contacts.
Here is how my storyboard looks like:
I searched a lot for a solution, but nothing good sor far...
Thank you in advance for the help.
MasterViewController is a NavigationController.
DetailViewController is a ChildViewController of MasterViewController
CreationViewController is presented modally from MasterViewController
You need to provide delegate for the MasterViewController to know the CreationViewController have finished the creation flow and the created info. Then you dismiss the CreationViewController in MasterViewController. Finally, you push DetailViewController with the created info.
I have a 'details' scene that can be navigated to by a drill down search. But I also have a qr reader that when it reads a QR code, should take the user to the same details page. Now, that all works fine. My only issue, is when the I use the scanner, I am not presented with the Navigation Controller to take my self back to the scanner. I am presented with a Back button for the drill down from the table.
What is the best method for giving me a navigation controller that will pop me back to the correct original calling view?
So the answer for those wondering, is WAY similar than I thought. In my example, I simply embedded my Scan scene in a Navigation Controller.
I have a couple views that come before I want to show my split view, disclaimer and then login. After successful login I want to segue to the the split view controller. However I do not think there is a way in storyboards to segue to a split view controller. How do I get from a normal view into my split view controller.
Sometimes if it seems to cumbersome it may be an indication that one need to look at the problem from a different angle.
Assuming your goal is that of forcing the user to go through the login process,
this is what I would do:
Have your splitView as the default view controller, added in the storyboard and loaded as the app starts
As soon as app is loaded, check for the existence of the user's credential. If you don't find any,
present your login framework modally (full screen to cover any data underneath).
Once the user has successfully logged it, dismiss the modalVC and you will have the underlying splitVC underneath ready for use.
This is my first ios app & I have a user registration process which is separated out into 3 screens. The first screen has user to enter his mobile number, the second screen asks him select his location & the third screen asks him to enter his birthday and a few other details.
So in total, there are totally 3 controllers which I have used.
1) mobile_number_controller.rb
2) location_controller.rb
3) miscellaneous_details_controller.rb
Each detail the user enters is validated and is stored into the NSUserDefaults. If the validation fails then the user is not allowed to move to the next screen. Also, once the user enters his details correctly, then the user does not have a back button to go back to the previous screen as well.
I would like to know which is the type of segue to be used here. Should I embed these controllers in a navigation controller and use a push segue, or should I be using a modal segue?
Update regarding the chain of controllers.
I don't intend to take the user back to any presenting controller at any stage. Also, in most code I have read till now, for modal segues, I have seen the presented controller being dismissed or there's an unwind segue to go back to the presented controller. I am a bit confused on what to do with these presented controller here before presenting the next controller in the series?
Also, as I mentioned that I store whatever data has been entered by the user in NSUserDefaults, theres no need for the presenting controller to know about the data entered in the presented controller. Hence I don't feel the need for an unwind segue( like in the 'new contacts' application).
Any help on this would be much appreciated.
I would prefer a modal segue to present a navigation controller and push segues to connect the other view controllers. Similar to webapps a user perhaps want to step back to change previously entered information.
I would use a series of modal segues (presented view controller). This is not a "user can go forward and back among views" situation: you are in total control of what the user sees. It is perfectly legal to present a view controller on top of a presented view controller. Moreover, it is simple to control how far back you take the user, e.g. go back all the way (dismissing all the views), if that's what you want to do.