programming4us
 
 
 
Programming

iPad Development : The Split View Concept

11/20/2010 3:19:35 PM
Up to this point, Dudel has been a fun toy, but it has at least one quite severe limitation: Apart from sending your drawing as e-mail, you have no way of saving what you've drawn. As soon as you quit the app, your work is gone! That's clearly not the way any iPhone or iPad app should work, so we're going to remedy that, and give the user a way to save any number of Dudel documents. We'll use a UISplitViewController to help us out here, so we can display an additional view controller that shows a list of all relevant files, letting the user switch between them easily.

The UISplitViewController, like the UINavigationController and UITabBarController, serves an organizational function. Rather than displaying any content on its own, it shows the view for an additional controller next to the main controller view in landscape mode, as shown in Figure 1.

Figure 1. Some inspiring Dudel art. Notice the list of available Dudel files on the left.

NOTE

The use of the UISplitViewController, in combination with a toolbar at the bottom of the main view, is somewhat unorthodox. The UISplitViewController always creates the left-side view with a title row at the top ("My Dudels" here), and Apple's recommendation when using UISplitViewController is to put the main view's toolbar (if any) at the top as well. I didn't do this for Dudel, and it does give the screen a slightly lopsided appearance. But I think this adds character! Of course, you're free to move the main view's toolbar to the top if you wish, to bring it more in line with what Apple recommends. And when you use a UISplitViewController in your own apps, you should probably put your main view's toolbar at the top, unless you have a good reason not to (a better reason than my claims of adding character!). If you rotate the device to portrait mode, something interesting happens. The UISplitViewController switches gears, and no longer shows a list of files on the left. Instead, it gives a UIBarButtonItem to its delegate (a view controller of our own), which can then add it to a toolbar. That button item, when touched, brings up the same view that was shown on the left side in landscape mode, this time displayed using a UIPopoverController, as shown in Figure 2.

Figure 2. In portrait mode, the file list is shown only when you click the button that brings up the popover.

This one will require no configuration on our part, since the UISplitViewController sets it up for us. However, we will still be required to dismiss the popover after the user makes a selection.

You might also notice in Figures 1 and 2 that the Email PDF button at the lower right has been swapped out for a generic action icon button. This will bring up a menu containing a handful of operations such as creating, renaming, and deleting files, which set up in this chapter.

Other -----------------
- jQuery 1.3 : Developing plugins - Adding new shortcut methods
- jQuery 1.3 : Developing plugins - DOM traversal methods
- Using Cloud Services : Exploring Online Planning and Task Management
- Using Cloud Services : Exploring Online Scheduling Applications
- Using Cloud Services : Exploring Online Calendar Applications
- SOA with .NET and Windows Azure : Service Contracts with WCF (part 3)
- SOA with .NET and Windows Azure : Service Contracts with WCF (part 2)
- SOA with .NET and Windows Azure : Service Contracts with WCF (part 1)
- Cloud Security and Privacy : Data Security and Storage
- iPad SDK : Working with Documents - Desktop Synchronization
- Required Project Images for iPad Apps
- iPhone SDK : GameKit Voice Chat
- iPhone SDK : Creating Basic GameKit Services (part 2) : Sending and Receiving Data
- iPhone SDK : Creating Basic GameKit Services (part 1)
- iPad : Navigating with Maps
- Adding iPad to the Mix
- A Brief History of Legacy .NET Distributed Technologies : .NET Remoting
- A Brief History of Legacy .NET Distributed Technologies : .NET Enterprise Services
- iPad SDK : Outputting to an External Screen
- iPad SDK : Displaying Multiple Videos
 
 
Video tutorials
- How To Install Windows 8 On VMware Workstation 9

- How To Install Windows 8

- How To Install Windows Server 2012

- How To Disable Windows 8 Metro UI

- How To Change Account Picture In Windows 8

- How To Unlock Administrator Account in Windows 8

- How To Restart, Log Off And Shutdown Windows 8

- How To Login To Skype Using A Microsoft Account

- How To Enable Aero Glass Effect In Windows 8

- How To Disable Windows Update in Windows 8

- How To Disable Windows 8 Metro UI

- How To Add Widgets To Windows 8 Lock Screen
programming4us programming4us
 
Top 10
 
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 3) - Configuring Recipient Filtering
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 2)
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 1)
- Implementing Edge Services for an Exchange Server 2007 Environment : Installing and Configuring the Edge Transport Server Components
- What's New in SharePoint 2013 (part 7) - BCS
- What's New in SharePoint 2013 (part 6) - SEARCH
- What's New in SharePoint 2013 (part 6) - WEB CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 5) - ENTERPRISE CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 4) - WORKFLOWS
- What's New in SharePoint 2013 (part 3) - REMOTE EVENTS
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS