UISplitViewController customization

I want to add a sidebar navigation like Kayak (see image), but I'm not sure how. The only way I can think of is adding a UIView to each of my main ViewControllers and then changing AppDelegate.window.rootViewController but I'm not sure.

Also, I want to make sure this works with UISplitViewControllers and I've had a hard time customizing this class.

Any help appreciated, thanks.

Answers


I would create a container view controller which has a side bar. Then add other view controllers to that container view controller as child view controller. By sidebar button actions you can switch (add / remove...) views of your child controllers( handled by container view controller ).

I did not understand you exactly:

if you want to use split view controller for that sidebar

UISplitviewcontroller has a master view (left view) with 320.0 px (non retina). Changing this value is not advised by apple.

or if you want to use a split view controller next to sidebar

split view controller has been made to be a root view controller of the app window. So it is not good to it here. Maybe you can create your own.

I do not think it is a good idea changing the root view controller of your window. Even if you do that you need to have a sidebar in every your views, which is not good.


This may be of use. Proceed with caution.

http://seriot.ch/resources/talks_papers/SEVerticalTabBar.pdf

https://github.com/nst/SEVerticalTabBar


Need Your Help

Java: Getting multiple lines from socket

java sockets line

I have a Java application that consists of a client and a server. The client sends encrypted commands to the server, and the server executes them.

Spark partitioning for file write is very slow

hadoop apache-spark hdfs parquet hadoop-partitioning

When writing a file to HDFS using Spark, this is quite fast when not using partitioning. Instead of that, when I use partitioning for writing the file, the write delay increases by factor ~24.