Tuesday, May 11, 2010

iPad Sample code

There doesn't seem to be a lot of blogs with iPad sample code online. This could be because the iPad has only been around for a month.
Apple have a few iPad samples that should be useful for developers. See below:

MultipleDetailViews :
This sample shows how you can use UISplitViewController to manage multiple detail views.
The application uses a split view controller with a table view controller as the root view controller. When you make a selection in the table view, a new view controller is created and set as the split view controller's second view controller.
The root view controller defines a protocol (SubstitutableDetailViewController) that detail view controllers must adopt. The protocol specifies methods to hide and show the bar button item controlling the popover.

SimpleGestureRecognizers
This sample shows how to use standard gesture recognizers. A view controller creates four gesture recognizers to recognize a tap, a right swipe, a left swipe, and a rotation gesture. When they recognize a gesture, the recognizers send a suitable message to the view controller, which in turn displays an appropriate image at the location of the gesture.

ToolbarSearch
This sample shows how to use a search field in a toolbar. When you start a search, a table view displaying recent searches matching the current search string is displayed in a popover.
The main view controller adds to a toolbar a bar button item with a search field as a custom view. If you tap the search field, the view controller presents a popover containing a list of recent searches. The list is stored in user defaults so that it persists between launches of the application, and is managed by the list's table view controller. The recents list is filtered by the current search term. If you select an item from the recents list, the item is copied to the search field and a search executed.

KeyboardAccessory
Shows how to use a keyboard accessory view. The application uses a single view controller. The view controller's view is covered by a text view. When you tap the text view, the view controller loads a nib file containing an accessory view that it assigns to the text view's inputAccessoryView property. The accessory view contains a button. When you tap the button, the text "You tapped me." is added to the text view. The sample also shows how you can use the keyboard-will-show and keyboard-will-hide notifications to animate resizing a view that is obscured by the keyboard.

TopPaid
This sample demonstrates how to build a universal application capable of running on both the iPhone and iPad. It shows the steps needed to make an existing iPhone application universal by introducing two unique user interface designs for both devices, yet using the same data model. The sample itself shows a multi-stage approach to loading and displaying a UITableView. It begins by loading the relevant text from an RSS feed so the table can load as quickly as possible, and then downloads the images for each row asynchronously so the UI is more responsive.

This are the samples that I could find on Apple Developer that show some iPad development techniques. If you come across other iPad samples, Leave them in the comments.







5 comments:

  1. Thank you very much.

    ReplyDelete
  2. Add the Popovers sample; it's very bare-bones, but it is an iPad sample.

    ReplyDelete
  3. HI
    Great information about ipad OS development
    IPAD application development is now in demand in the worldwide market. Today is a potential market for independent developers and corporate developers who are interested in taking advantage of their experience.

    ReplyDelete
  4. Link to top paid is down !

    ReplyDelete