Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
ReadMe.txt
HeaderFooter |
Demonstrates how to implement and customize the 2 UIView properties of UITableView: |
header ('tableHeaderView') and footer ('tableFooterView'). |
It is designed to somewhat resemble the "Contacts" application, showing you ways to design your own header and footer content. It uses the UITableViewStyle: UITableViewStyleGrouped to achieve a more similar appearance as well. |
This sample implements two basic UIViews from a nib file: one for the header and one for the footer. Each as IBOutlets are set as header and footer properties of the UITableView. Additional code is provided to illustrate how to set their transparent background colors, but the same work that can also be done in the UIView's xib. |
Build Requirements |
iOS 4.0 SDK |
Runtime Requirements |
iPhone OS 3.2 or later |
Using the Sample |
Launch the HeaderFooter project using Xcode. |
To run in the simulator, set the Active SDK to Simulator. To run on a device, set the Active SDK to the appropriate Device setting. When launched notice the customized header and footer for the grouped-style UITableView. |
Packaging List |
main.m - Main source file for this sample. |
AppDelegate.h/.m - The application's delegate to setup its window and content. |
MyTableViewController.h/.m - The main UIViewController containing the header/footer example for UITableView. |
Changes from Previous Versions |
1.0 - First release. |
1.1 - Upgraded for 3.0 SDK due to deprecated APIs; in "cellForRowAtIndexPath" it now uses UITableViewCell's initWithStyle. |
1.2 - Upgraded project to build with the iOS 4.0 SDK. |
1.3 - Added CFBundleIconFiles in Info.plist. |
Copyright (C) 2008-2010 Apple Inc. All rights reserved. |
Copyright © 2010 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2010-06-29