Presenting modal view over partial page curl modal view - ios

I have my main menu embedded in a navigation controller. The settings button performs a modal segue to show my settings page which is half a page shown using the partial page curl.
Now on the settings I have a 'legal' button which I want to just display a full screen UITextView with all my legal stuff.
The problem is, when I display the legal view controller using a modal segue, it displays behind the partial page curl.
If I try using a push segue, it crashes because there is no Navigation controller as the settings is shown modally.
Is there a way to present a modal view over the top of a partial page curl?
Thanks

Best option I can think of is managing all your segues in your initial main menu controller.
For example, you can write a delegate method such that, if the user hits 'legal', you dismiss the modal view (from within your main menu controller's .m) using a delegate method, and then in that same method present a new modal view controller for the settings page (with it's parent being the main menu view controller, which can then have another delegate method to dismiss the legal page and present the settings menu).

Related

How do I make the login screen with the main tabview controller that makes it open the first time the app is opened

Link to image here
This is the view of the screens
I want
I can't link it to the main tab bar controller
Give the nav controller that parents the login screen a storyboard identifier. Next, create a custom UITabBarController subclass and assign it to the Tab Bar Controller. In its viewDidAppear method, check to see if you need to log in. If so, instantiate the login nav controller via its storyboard ID and present it modally.
Set your login screen as initial view controller. You can set view controller as initial view from attribute inspector. When user login's successfully, present your main tab view controller.

login view controller and main tab bar controller

I have an app that should either show a login page or a main tab bar controller.
What's the best way to set this up? For now I'm starting out with an empty view controller and then either presenting a navigation controller for the login flow, or a tab bar controller for the main app. This means the entire contents of my app live within a modally presented view. Is that bad?
How do most people handle this?
I assume most people set the tab bar as their default view and present a modal login controller above it if necessary. Then when you log in you can just dismiss the login controller and you are back at your tab bar controller.
Your method should work just fine though.

How a Page View Controller can pause the Root View Controller from running. (xcode)

My app starts with a View Controller (Initial). On this View Controller i display a countdown message (using NSTimer and scheduledTimerWithTimeInterval) that is auto-initiated when the user opens the app (viewDidLoad method).
In the settings menu (a second View Controller (modal segue to the initial) a have a "Tutorial" menu choice that leads to a Page View Controller that handles a couple of View Controllers and presents them as Form Sheets). The last page of this Page View Controller has a button "OK" that dismisses the Page View Controller (so that brings you back to the Settings menu according to my Storyboard).
So far, so good.
Now when the user runs the app, i call from my initial View Controller the viewDidAppear method and using NSUserDefaults i run a check if this is the first time the user runs the app. If YES it creates an instance of the Page View Controller that displays (as form sheet) the Tutorial. And here is my problem..The initial View Controller is running at the background as expected to do so.. but how can i pause the countdown message until the user dismisses the Tutorial (by pressing the OK button)?
NOTICE: I've just noticed that if you change the page view controller
presentation as "Full Screen" or run the app on the iphone instead of
the ipad (forced full screen presentation) the app is running normally, but that,i
assume, is because in this case (full screen presentation) the initial
view controller won't load until the page view controller is being
dismissed!
I think that your PageViewController has a reference to his parent view controller (InitialViewController), so you have to define your NSTimer as a InitialViewController property.
You can use global app notification system to let know your rootViewController about external events. Check out NSNotificationCenter class reference.

The TabBarItem disappear when I push in other view

I have a TabBarApplication with four views in the main TabBarItem. The problem comes when I go to any of these views and click in any button to go to another view and when I go back by a button linked to the main view, the TabBarItem of the app disappear!!
For example, one view of the app is a tableView in which each element of the list is linked to his external view and it has a back button that should return to the tableView. All the segues are by modal, not push because push segue crash the application and by modal it runs correctly but the problem comes when I returned by clicking the back button of the NavigationItem in the header of the view to his main view and the TabBarItem of the app is not there, is empty.
Each tab should have the view controller set to a navigation controller, with the view controller you want set as the root view controller of the navigation controller. Now you can use push segues and the standard back button that will be added for you. This will bypass the issue (and work much better for you and users).
You current issue is likely related to not really ever going back. Instead, just always presenting new modal view controllers which replace any existing content on screen.

Creating an initial view before displaying views with UITabController

I am creating an app that uses a UITabController with 5 tabs for navigation. Right now my app loads the first tab as the initial view upon app loading.
I want to be able to change that so I have a view that doesn't use my UITabController as the initial view, and once they click the one button on it, it brings them to the First View and displays the TabController.
I thought I'd simply set up a new view, change that one to the initial view controller and have a segue from the button to the TabController, but when I tried that and the view I wanted to with the button loaded first, but when clicking button it said something about needing to set up a NavigationController? Not sure what to do from here.
I think it's best to leave your tab bar controller as the window's root view controller. You can present the initial view controller from the viewDidAppear method of the controller in the first tab, using presentViewController:animated:completion:. Do this with the animated parameter set to NO, and the initial view will be the first thing the user sees. When you're done with that view, just dismiss it, and you'll be back to the first tab's view.

Resources