I am trying to learn about Storyboards feature in iOS 5. I have this app that presents a EULA view with an accept button the first time it opens. The app remembers that the user accepted the EULA, and does not show it again. It shows another view (a tab bar view) as the first view from that point on. Can this be accomplished with storyboards? So far, I am only able to use a segue for user controlled actions. Where do I put the logic of checking the preferences to see if the user accepted the EULA and picking which UI View controller to show next, using one storyboard for the whole app? Hope this is clear.
thanks,
You can check your setting in your main view or in the app delegate using -application:didFinishLaunchingWithOptions.
Once you have decided which view to display, you can transition to that view using -performSegueWithIdentifier:.
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 have created a Tab Bar controller. It has 4 tabs. I now want to place a Button which would take place as the 5th tab. Clicking the button should perform some action (i.e. log something)
Here is a image of what i am trying to do. The last tab is supposed to be a button and not a Tab Bar View Controller. Is this possible to do?
Saw this link but not sure if its what i am looking for. link
As per apple guidelines when you add more then 5 tabs the 5th tab will auto named as More; this because of the use interaction and focus of touch. And not recommend to have more than 5 tabs when you go with custom implementation. This is because there are chance of rejections when you submit the app to App Store.
For your reference here is the same question by other user 5th tab to be a button
I don't think Apple's iOS SDK has such way to approach. I really recommend you to check out some customized design like
KYGooeyMenu
If you think that's what you want, you can integrate it into your project.
I'm designing an app intended to have the following navigation structure: I need to have a welcome view with "Sign up" and "Sign in" buttons as most of apps have:
This view does not show any navigation bar, as it seems to be the common thing. If "Sign In" tapped, then the login view will be presented modally:
And if "Sign up" tapped, the welcome view navigates to a form requesting user input to create an account:
Then, once the user logs in and enters the app, I'd want it to have side menus similar to Facebook, YouTube or Spotify:
Being the central panel a UINavigationController. Left side panel I think it usually is an 'UIViewController'...
The point is, I donĀ“t know what the rootViewController of my app should be, and what hierarchy of view controllers should I have. I've thought about a couple of possibilities:
1) Being the rootViewController an UINavigationController, push the welcome view hidding the navigation bar (is that possible?), presenting the "Sign In" view if needed or pushing the "Sign Up" view. Once the user has logged in, pop these views from the rootViewController, that is a UINavigationController, and then push in such navigation controller the custom view controller managing the side menu stuff.
2) Being the rootViewController the side menu custom view controller, and setting as its central panel an UINavigationController. Push there the welcome view and so on, without setting any view controller for the left/right panels, and then when user has logged in, pop those views from the central panel's UINavigationController, push there the corresponding view, and now setting the left/right panels
I hope I've explained myself. Maybe there is another and better approach to handle this scenario. Does somebody implemented an app like this? I need help with this issue, and also I'll appreciate being recommended a custom library/control providing the side menu stuff from someone who has used one and it is easy to use and customize. I know there are lots of them (MMDrawerController, JASidePanels, for example), but I'd like to have some opinions from people that had developed an app with one of them.
Note: I need to support iPad as well, and iOS 5+
Thanks a lot
I would recommend you to have two main ViewControllers, one for login/signup and second one for the main content with side menu. After the user will log in, just change the window rootViewController to the second one.
For the side menu you can use:
JTRevealSidebar for iOS
GSSlideMenu
JASidePanels
MMDrawerController
I've design an app using ECSlidingViewController (created by Michael Enriquez) which works very fine for me and easy to use.
Tutorial also available on youtube : http://www.youtube.com/watch?v=tJJMyzdB9uI
As for Swift, you could use InteractiveSideMenu library as Side Menu. It's quite easy to implement and transition animation looks pretty smooth.
It was a good find for my project.
I want to do use the Apple template for a Page-based App (Xcode 4.4.1, iOS 5) and then be able to "push" pages from the page view...
Create a Page-based App
Add a button to Data View -> view -> view (The nested view)
Add a "Push" segue to a new Controller/View
Expect when the button is pressed that it will "Push" to the new view.
But it doesn't, and I don't know how to make it happen. I assume I need a UINavigationController somewhere, but I'm not sure where and how to insert it.
Note: I can use a modal segue which does what is expected, but not a push segue.
Thanks.
I found the answer, and it was one of the two obvious choices. I added a navigation controller in front of the RootViewController.
I think I missed it originally because Xcode keep crashing so I assumed it wasn't going to work.
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.