Operating system requirements: iOS 5.0 or later.
Mobile device: iPad.
This example displays working with a container divided into two data views. After starting the example the following operations are executed:
A dimension panel container is set as the first data view.
The first data view is offset to the right by 5% from its size.
A table is set as the second data view.
A title with the text "Prognoz" offset 50 pixels to the left is displayed in container.
The title is divided from the second data view with a horizontal black line.
A loading indicator is displayed during loading the second data view.
Executing the example requires to place the following code in the body of the executeExample method of the ViewController class (see the Displaying of Express Report section):
// Get express report controller MAExpressAnalysisReportViewController *contr = (MAExpressAnalysisReportViewController *)m_controller; // Get dimension panel controller PanelViewController *panelViewCtrl = [contr panelViewController]; // Create a controller for working with container divided into two data views SplitViewController *splitController = [SplitViewController new]; // Load container [splitController loadView]; // Display loading indicator for the second data view [splitController showWaiter]; // Set dimension panel container as the first container data view [splitController setPanelViewController: panelViewCtrl]; // Set position of separator between two container data views [[splitController splitView] setSeparatorPosition: (panelViewCtrl.view.frame.size.width * 1.05)]; // Disable animation on changing container separator [splitController setNoResizeUntilAnimated: YES]; // Create a table to be displayed as the second data view UITableViewController *table = [UITableViewController new]; // Set the second container data view [splitController setSecondView: [table view]]; // Create a container title SplitViewTitleView *title = [[splitController splitView] titleView]; // Set container title area lower border color [title setBottomLineColor: [UIColor blackColor]]; // Set text indent from title area left border [title setLeftPadding: 50]; // Set title text [[title titleLabel] setText: @"Prognoz"]; // Set title area fill color [title setBackgroundColor: [UIColor colorWithHex:@"d9d9d9"]]; // Set container title height [[splitController splitView] setTitleHeight: 70.0]; // Update container title [title updateTitleViewFrame]; // Display title [[splitController splitView] setHasTitle: YES]; // Display container with separator [self showViewControllerInNavigationController: splitController]; // Hide second data view loading indicator [splitController hideWaiter]; // Update container with separator [[splitController splitView] update];
After executing the example the container divided into dimension panel container and table is displayed:
The first data view is offset to the right by 5% of its size. The upper part of the second data view displays container title with the text "Prognoz" and the left indent of 50 pixels. The title is divided from the second data view with a horizontal black line.
The example execution result remains the same if the code string:
[splitController setSecondView: [table view]];
is replaced with the following string:
[splitController setContentViewController: table];
Both strings are used to set the second container data view.
Then delete the first container data view by adding the following code string to the example:
[splitController setNoFirstViewMode: [splitController firstViewVisible]];
After executing the example the dimension panel container is deleted:
See also: