Do I need segues when using a UITabBarController? - ios7

This is probably a lame question, but I don't know the answer (I have looked but found nothing). I created an iPad app that looks like this:
The red arrow is pointing to a UITabBarController, from which I connected segues to the other UIViewControllers. I also have a UINavigationController to the right, where I use segues to go between each of the modal scenes.
My question is: do I really need the segues that are attached to the UITabBarController? I have a need to programmatically go to one of the tab views from one of the modal scenes, but I can't seem to give an identity to any of the segues emanating from the UITabBarController, which makes me think they are useless/not used.

The answer is YES, they are needed. https://devforums.apple.com/message/930339#930339

Related

iOS using one general UIView as newsScroller in every ViewController, or any View

I tried to find answer for this question, but i couldnt find.
I'm developing an application what's using tabBarController as main navigation, and there are also navigationControllers in every Tab.
I would like to make a little 30px height news-scroller view under the navigationBar on every screen, but this scroller should be application-level, because it should show the same text on every view, and should change the text in the same time. I dont think that making 9 scrollerView and connect them somehow isnt the best way.
Is there any woraround for this in iOS?
Thank you in advance.
Probably the best way would be to subclass a UIViewController and add scrollView in top of the view (bellow the navigationBar). After that connect the scrollView instance with single (app wide) scrollView data model instance for example with KVO or Notifications technique. This approuch should fit to MVC pattern.
May be you add your ticker into the main view
Wouldn't it be possible to subclass the tabBarController in order to hold your scrollview as a subview?
Simply speaking in term of architecture it would do the trick. But it could not be as easy to perform as I think. (I am not an interface friend)

Can you use Storyboard without UINavigationBar?

As the title says, I am wondering if/how you use Storyboard without UINavigationBars? How do you disable these UINavigationBars if you just want to make use of storyboard but not this other control it comes with?
Your view controllers will only have navigation bars provided if they're part of a UINavigationController stack. You're not obligated to use UINavigationController.

Can a splitview be loaded inside the detail view of another splitview?

I am trying to develop an application that has screen flow similar to oracle app. I have attached the images here. Can anyone please tell how this can be achieved ?
Thanks in advance.
What you are looking for is a custom Split View Controller. The screenshots you provided are of custom split view controllers. The UIKit has UISplitViewController but this must be a fullscreen view controller.
To make a custom split view controller there's the old way, by having a main view controller and making your two master and detail controllers, adding their view to the main view controllers view.
You need to forward on calls from viewWillAppear:, viewWillDisappear: etc from the main view controller to the two controllers that you manage.
As of iOS 5, you can do something similar with view controller containment, this has a few more bells and whistles, more interesting it handles rotation animations better and all the call forwarding to the children controllers that you had to do manually in the first solution.
Check out this link for more details on custom split view controllers:
http://www.mindtreatstudios.com/how-its-made/custom-uisplitviewcontroller-ios/
To answer your question directly: if you make a custom split view controller - yes you can add this as a detail view controller. But watch out, this isn't a UISplitViewController, so just be careful not to use that term so much.
Haven't really tested this, but doesn't this solve your problem?
Create a storyboard file
Drop in a SplitViewController
Delete the DetailViewController
Drop in another SplitViewController
Link the two together using CTRL-drag and select Detail
Set the size of the detail-splitviewcontroller to Detail
????
Profit!
Anyways, not sure if it really works, but give it a try. This is IOS5 though (I think, might try it out with IB).
It'll look something like this:
If you're going to have to write your own class, you might want to first look at https://github.com/mattgemmell/MGSplitViewController for inspiration.

How can I do an animated switch to UISplitView?

I have looked at the sample generated by xcode when creating a new UISplitView app on the iPad along with countless other tutorials and the documentation from the apple developer site. I have not seen an example where the UISplitView used was not the root of the application. Is this even possible?
What I am trying to accomplish: I have a UITableView to start out and once an item in the list is selected I would like to display a splitview with two different sets of information that is based on the item that was selected.
I curious if this type of implementation is even possible, or just frowned upon, and why. If it is possible, how would I go about implementing and hooking up a UISplitView to behave in this way?
Edit: I'm updating this with what I have. I can now switch to my UISplitView, though the transition is not animated. What is the way to correctly switch to a UISplitView so the transition is animated?
Code for switching right now:
[appDelegate.window addSubview:appDelegate.splitViewController.view];
appDelegate.window.rootViewController = appDelegate.splitViewController;
EDIT 2: In hopes of bumping this back up so more people see it, I have managed to switch from my navigationController to my splitViewController, but when I add the button to be able to navigate back, nothing I do makes a difference and I seem to be locked in. I tried reverse mirroring the code to switch to the splitViewController, but that had no affect, and I am completely out of ideas. Can anyone shed some light on this?
You should always use SplitViewController as a rootViewController: Split view controller must be root view controller
There may be some hacks around it, but when Apple have a strong recommendation and design guidance, I suggest to try to re-think your design before going against the platform -it should save you effort in the long term.
I recommend using the MGSplitViewController, it also works as a non-rootViewController, even nested into an another MGSplitViewController, and there's i.e. a one-liner for the animation to blend in the Master-View, if that is what you want.
In your UITableView didSelectRowAtIndexPath method you would have something like:
UISplitViewController *mySplitView = [[UISplitViewController alloc] init];
[self.navigationController pushViewController:mySplitView animated:YES];
[mySplitView release];
Probably you'll want to subclass UISplitViewController just like you would other view controllers and set in there the master and detail views and so on.

May I add a second subview to window if rootViewController is a UISplitViewController to simulate a modal effect?

I'm currently using UISplitViewController as my app's rootViewController. To present progress dialogs I use presentModalViewController, but for the one and other reason I'm not entirely happy with it and want to do my own modal thing.
If one of my modal views is supposed to be shown, I want to add another subview to my app's main window. This subview is going to be managed by its own UIViewController subclass to make it rotate properly and do all the stuff I need.
Is this design aproach okay or will I run into issues with UISplitViewController (it is very special in so many ways and seems to be offended easily if not treaten right! :-))?
Is it a problem to have two UIViewControllers next to each other?
Please don't discuss "why don't you use presentModalViewController then?".
You may be ok with UISplitViewController if you do it properly, as presentModalViewController does something similar.
One alternative you should look into is UIPopoverController and the UIViewController's modalIfPopover property.
Also, you say you aren't happy with presentModalViewController and perhaps if you say what was wrong with it we can help you work around whatever issues you have with it. This is the exact case that it seems to be meant for.