UISplitViewController with best behavior - ios

Until now, I used UISplitViewController with static UITableView and segues.
here a little exemple of my storyboard
(I have multiple DetailViewControllers)
But not working like I want.
I want UISplitViewController like iOS Settings app & Notes app, that is to say, I don't want re-load my UIViewController when I selected it (like Notes app). And if I selected the actually UIViewController embedded in a UINavigationController, I want automatically get a "popToRootViewController" totally like iOS Settings app.
I've done a lot of research and couldn't really figure out how to set this up.
I'm French and not very good in English so please excuse me if I'm not very clear.
Thank you.

Related

How to turn iPhone style table view into iPad style table view (Swift)

I apologise in advance if this is a really simple thing to do, but I have searched and searched for answers and cannot find anything anywhere.
I have made an iPhone app that has a similar sort of interface to the built-in iPhone Mail app. It has a table view, and when you tap on an item it segues to the corresponding document. When I build it for iPadOS it works in the same way, as you would expect.
But this isn't how iPad apps are supposed to look. I want my app to look like the Mail app does when running on an iPad, with the table view to the left of the content when in landscape, and the ability to slide it in when in portrait. I simply have no idea how to even get started though. If anyone can help, I'd really appreciate it! Thanks!

What is the correct pattern for creating a header navigation across the app?

I have been googling around, and I found some suggestions to use UINavigationController and sometimes the UITabBarController also makes sense (but to a lesser degree).
I never used a UINavigationController ...I just tried to and when I dragged it to the storyboard, it put two screens on the storyboard (a navigation controller connecting to a UITableView). So I think this isn't what I actually needed.
Can someone please help me understand what I need to do to make a header navigation that is persistent across all the screens? In it I want to have sections like:
Home | Section1 | Section2 | Section3
Thanks!
It may help to consider what the user will see as the "meaning" of the structure you use.
The sense of a navigation controller is as a container that lets you show a sequence of content controllers where actions on one of them lead logically to the next. The sense of a tab bar controller is of (mostly) unrelated content controllers that co-exist and don't have (much) dependence on each other.
I think it's good to start with the purpose of the interface rather than the appearance.
I'm gonna suggest to you something that helped me a lot, which is to go download Stanford's iPhone and iPad Development course CS193P from iTunes U (you go in iTunes Store, search for it and download it).
Secondly, you shouldn't ask such general questions on SO, the question you asked is something you can find out on your own by researching, reading Apple's developer documentation, or doing a tutorial as I just suggested. Best of luck.

Presenting a login with storyboards for iOS

I have a simple iOS Master-Detail Application
-> On the iPad it's a splitview, on the iPhone it's a simply a tableview with navigation
Now I need to have a login first but I just can't find a proper solution for it.
I think the only part of the application that should decide whether a login needs to be presented is the AppDelegate.
But how would I have to wire my storyboard to be able to do that on both.. iPhone and iPad?
The other idea is to start with the login and dismiss it if it's not needed any more. But I also can't push or modal present a splitview on the iPad...
How would you solve this problem?
Without storyboards it's easy.. but with storyboards for me it seems hard do to... but I have to admit that I don't have any storyboards experience so far...
Thanks for helping
http://maybelost.com/2011/12/tutorial-storyboard-app-with-core-data/
Download this sample app. It contains a Login with CoreData. Its very simple :)
Several weeks ago i used that also for my first Login and it worked like charm.
Hope it will help you too!

iOS:Switching between views using UINavigationBarController

First of all, I am using XCode 4.2 and I am not using storyboards. I need to make an application with 2 views.
First view will contain a button and a navigation bar, the button's IBAction should only go to the second view, and from the secondview you should be able to go back to the first view via the Navigationbar.
My problem is the navigation controller / navigation bar, how do I set that up ?
I know that it would be smart using the singleView app and then add a navigation controller, the problem is that I dont know how to set it up in the code.
I have searched for similar problems on the internet, and I keep getting into posts where they use another SDK or using an older xcode etc.
What I do know is how to make the button, actions and delegation.
Anyone out there who is sitting with the one and only tutorial I am missing or can tell me how to do it ?
Thank you
Use the Master-Detail Application template. Ignore the stuff for tables, it has navigation stack implemented in it. By deleting the tables, you should be pretty much left with what you are after.
You should go to http://developer.apple.com/, search for UINavigationController, click on UINavigationController Class Reference, then look at one of the linked sample code projects there.
if you really want to learn how to implement it from scratch (and not depend on the master-detail template), i highly recommend the following resources:
the apple documentation on UINavigationController
the solutions from the big nerd ranch iOS Programming guide (particularly the Homepwner example)
also found this tutorial in a quick google search, but haven't fully vetted it in xcode 4.2 (there will likely be small differences in how you have to go through the steps).

Multiple SplitViewControllers in iPad Application

We are creating an iPad application that uses multiple SplitViewController. From the Apple documentation I understand that the SplitViewController needs to be the rootViewController of the window.
Does anyone have any experience or suggestions on how to create a navigation scheme that switches between multiple SplitViewControllers?
Its seems that this is not a supported design. We have since decided to use one SplitViewController at the root, and swap out it's views when the screen changes. This seems to work pretty well.

Resources