| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iPhone OS 2.0 and later. |
| Companion guide | |
| Declared in | UITableView.h |
| Related sample code |
An instance of UITableView (or simply, a table view) is a means for displaying and editing hierarchical lists of information.
A table view in the UIKit framework is limited to a single column because it is designed for a device with a small screen. UITableView is a subclass of UIScrollView, which allows users to scroll through the table, although UITableView allows vertical scrolling only. The cells comprising the individual items of the table are UITableViewCell objects; UITableView uses these objects to draw the visible rows of the table. Cells have content—titles and images—and can have, near the right edge, accessory views. Standard accessory views are disclosure indicators or detail disclosure buttons; the former leads to the next level in a data hierarchy and the latter leads to a detailed view of a selected item. Accessory views can also be framework controls, such as switches and sliders, or can be custom views. Table views can enter an editing mode where users can insert, delete, and reorder rows of the table.
A table view is made up of zero or more sections, each with its own rows. Sections are identified by their index number within the table view, and rows are identified by their index number within a section. Any section can optionally be preceded by a section header, and optionally be followed by a section footer.
Table views can have one of two styles, UITableViewStylePlain and UITableViewStyleGrouped. When you create a UITableView instance you must specify a table style, and this style cannot be changed. In the plain style, section headers and footers float above the content if the part of a complete section is visible. A table view can have an index that appears as a bar on the right hand side of the table (for example, "a" through "z"). You can touch a particular label to jump to the target section. The grouped style of table view provides a default background color and a default background view for all cells. The background view provides a visual grouping for all cells in a particular section. For example, one group could be a person's name and title, another group for phone numbers that the person uses, and another group for email accounts and so on. See the Settings application for examples of grouped tables. Table views in the grouped style cannot have an index.
Many methods of UITableView take NSIndexPath objects as parameters and return values. UITableView declares a category on NSIndexPath that enables you to get the represented row index (row property) and section index (section property), and to construct an index path from a given row index and section index (indexPathForRow:inSection: method). Especially in table views with multiple sections, you must evaluate the section index before identifying a row by its index number.
A UITableView object must have an object that acts as a data source and an object that acts as a delegate; typically these objects are either the application delegate or, more frequently, a custom UITableViewController object. The data source must adopt the UITableViewDataSource protocol and the delegate must adopt the UITableViewDelegate protocol. The data source provides information that UITableView needs to construct tables and manages the data model when rows of a table are inserted, deleted, or reordered. The delegate provides the cells used by tables and performs other tasks, such as managing accessory views and selections.
When sent a setEditing:animated: message (with a first parameter of YES), the table view enters into editing mode where it shows the editing or reordering controls of each visible row, depending on the editingStyle of each associated UITableViewCell. Clicking on the insertion or deletion control causes the data source to receive a tableView:commitEditingStyle:forRowAtIndexPath: message. You commit a deletion or insertion by calling deleteRowsAtIndexPaths:withRowAnimation: or insertRowsAtIndexPaths:withRowAnimation:, as appropriate. Also in editing mode, if a table-view cell has its showsReorderControl property set to YES, the data source receives a tableView:moveRowAtIndexPath:toIndexPath: message. The data source can selectively remove the reordering control for cells by implementing tableView:canMoveRowAtIndexPath:.
UITableView caches table-view cells only for visible rows, but caches row, header, and footer heights for the entire table. You can create custom UITableViewCell objects with content or behavioral characteristics that are different than the default cells; âA Closer Look at Table-View Cells" in Table View Programming Guide for iPhone OS explains how.
– dequeueReusableCellWithIdentifier:
style property
– numberOfRowsInSection:
– numberOfSections
rowHeight property
separatorStyle property
separatorColor property
tableHeaderView property
tableFooterView property
sectionHeaderHeight property
sectionFooterHeight property
sectionIndexMinimumDisplayRowCount property
– cellForRowAtIndexPath:
– indexPathForCell:
– indexPathForRowAtPoint:
– indexPathsForRowsInRect:
– visibleCells
– indexPathsForVisibleRows
– scrollToRowAtIndexPath:atScrollPosition:animated:
– scrollToNearestSelectedRowAtScrollPosition:animated:
– indexPathForSelectedRow
– selectRowAtIndexPath:animated:scrollPosition:
– deselectRowAtIndexPath:animated:
allowsSelection property
allowsSelectionDuringEditing property
– beginUpdates
– endUpdates
– insertRowsAtIndexPaths:withRowAnimation:
– deleteRowsAtIndexPaths:withRowAnimation:
– insertSections:withRowAnimation:
– deleteSections:withRowAnimation:
editing property
– setEditing:animated:
– reloadData
– reloadRowsAtIndexPaths:withRowAnimation:
– reloadSections:withRowAnimation:
– reloadSectionIndexTitles
dataSource property
delegate property
For more about Objective-C properties, see “Properties” in The Objective-C Programming Language.
A Boolean value that determines whether users can select cells
@property(nonatomic) BOOL allowsSelection
If the value of this property is YES (the default), users can select rows. Setting this property affects cell selection only when the table view is not in editing mode. If you want to restrict selection of cells in editing mode, use allowsSelectionDuringEditing.
UITableView.hA Boolean value that determines whether users can select cells while the receiver is in editing mode.
@property(nonatomic) BOOL allowsSelectionDuringEditing
If the value of this property is YES , users can select rows during editing. The default value is NO. If you want to restrict selection of cells regardless of mode, use allowsSelection.
UITableView.hThe object that acts as the data source of the receiving table view.
@property(nonatomic, assign) id<UITableViewDataSource> dataSource
The data source must adopt the UITableViewDataSource protocol. The data source is not retained.
UITableView.hThe object that acts as the delegate of the receiving table view.
@property(nonatomic, assign) id<UITableViewDelegate> delegate
The delegate must adopt the UITableViewDelegate protocol. The delegate is not retained.
UITableView.hA Boolean value that determines whether the receiver is in editing mode.
@property(nonatomic, getter=isEditing) BOOL editing
When the value of this property is YES , the table view is in editing mode: the cells of the table might show an insertion or deletion control on the left side of each cell and a reordering control on the right side, depending on how the cell is configured. (SeeUITableViewCell Class Reference for details.) Tapping a control causes the table view to invoke the data source method tableView:commitEditingStyle:forRowAtIndexPath:. The default value is NO.
UITableView.hThe height of each row (table cell) in the receiver.
@property(nonatomic) CGFloat rowHeight
The row height is in points. You may set the row height for cells if the delegate doesn't implement the tableView:heightForRowAtIndexPath: method. If you do not explicitly set the row height, UITableView sets it to a standard value.
There are performance implications to using tableView:heightForRowAtIndexPath: instead of rowHeight. Every time a table view is displayed, it calls tableView:heightForRowAtIndexPath: on the delegate for each of its rows, which can result in a significant performance problem with table views having a large number of rows (approximately 1000 or more).
UITableView.hThe height of section footers in the receiving table view.
@property(nonatomic) CGFloat sectionFooterHeight
This value is used only in section group tables, and only if delegate the doesn't implement the tableView:heightForFooterInSection: method.
UITableView.hThe height of section headers in the receiving table view.
@property(nonatomic) CGFloat sectionHeaderHeight
This value is used only if delegate the doesn't implement the tableView:heightForHeaderInSection: method.
UITableView.hThe number of table rows at which to display the index list on the right edge of the table.
@property(nonatomic) NSInteger sectionIndexMinimumDisplayRowCount
This property is applicable only to table views in the UITableViewStylePlain style. The default value is NSIntegerMax.
UITableView.hThe color of separator rows in the table view.
@property(nonatomic, retain) UIColor *separatorColor
The default color is gray.
UITableView.hThe style for table cells used as separators.
@property(nonatomic) UITableViewCellSeparatorStyle separatorStyle
The value of this property is one of the separator-style constants described in UITableViewCell Class Reference class reference. UITableView uses this property to set the separator style on the cell returned from the delegate in tableView:cellForRowAtIndexPath:.
UITableView.hReturns the style of the receiver. (read-only)
@property(nonatomic, readonly) UITableViewStyle style
See “Table View Style” for descriptions of the constants used to specify table-view style.
UITableView.hReturns an accessory view that is displayed below the table.
@property(nonatomic, retain) UIView *tableFooterView
The default value is nil. The table footer view is different from a section header.
UITableView.hReturns an accessory view that is displayed above the table.
@property(nonatomic, retain) UIView *tableHeaderView
The default value is nil. The table header view is different from a section header.
UITableView.hBegin a series of method calls that insert, delete, select, or delete rows and sections of the receiver.
- (void)beginUpdates
Call this method if you want subsequent insertions, deletion, and selection operations (for example, cellForRowAtIndexPath: and indexPathsForVisibleRows) to be animated simultaneously. This group of methods must conclude with an invocation of endUpdates. These method pairs can be nested. If you do not make the insertion, deletion, and selection calls inside this block, table attributes such as row count might become invalid. You should not call reloadData within the group; if you call this method within the group, you will need to perform any animations yourself.
UITableView.hReturns the table cell at the specified index path.
- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath
The index path locating the row in the receiver.
An object representing a cell of the table or nil if the cell is not visible or indexPath is out of range.
UITableView.hDeletes the rows specified by an array of index paths, with an option to animate the deletion.
- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
An array of NSIndexPath objects identifying the rows to delete.
A constant that indicates how the deletion is to be animated, for example, fade out or slide out from the bottom. See “Table Cell Insertion and Deletion Animation” for descriptions of these constants.
Note the behavior of this method when it is called in an animation block defined by the lbeginUpdates and endUpdates methods. UITableView defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This happens regardless of ordering of the insertion and deletion method calls. This is unlike inserting or removing an item in a mutable array, where the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see “Batch Insertion and Deletion of Rows and Sections” in Table View Programming Guide for iPhone OS.
UITableView.hDeletes one or more sections in the receiver, with an option to animate the deletion.
- (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
An index set that specifies the sections to delete from the receiving table view. If a section exists after the specified index location, it is moved up one index location.
YES to animate the deletion of sections, otherwise NO.
Note the behavior of this method when it is called in an animation block defined by the lbeginUpdates and endUpdates methods. UITableView defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This happens regardless of ordering of the insertion and deletion method calls. This is unlike inserting or removing an item in a mutable array, where the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see “Batch Insertion and Deletion of Rows and Sections” in Table View Programming Guide for iPhone OS.
UITableView.hReturns a reusable table-view cell object located by its identifier.
- (UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier
A string identifying the cell object to be reused. By default, a reusable cellâs identifier is its class name, but you can change it to any arbitrary value.
A UITableViewCell object with the associated identifier or nil if no such object exists in the reusable-cell queue.
For performance reasons, a table viewâs data source should generally reuse UITableViewCell objects when it assigns cells to rows in its tableView:cellForRowAtIndexPath: method. A table view maintains a queue or list of UITableViewCell objects that the table viewâs delegate has marked for reuse. It marks a cell for reuse by assigning it a reuse identifier when it creates it (that is, in the initWithFrame:reuseIdentifier: method of UITableViewCell). The data source can access specific âtemplateâ cell objects in this queue by invoking the dequeueReusableCellWithIdentifier: method. You can access a cellâs reuse identifier through its reuseIdentifier property, which is defined by UITableViewCell.
UITableView.hDeselects a given row identified by index path, with an option to animate the deselection.
- (void)deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated
An index path identifying a row in the receiver.
YES if you want to animate the deselection and NO if the change should be immediate.
Calling this method does not cause the delegate to receive a tableView:willSelectRowAtIndexPath: or tableView:didSelectRowAtIndexPath: message, nor will it send UITableViewSelectionDidChangeNotification notifications to observers.
Calling this method does not cause any scrolling to the deselected row.
UITableView.hConclude a series of method calls that insert, delete, select, or reload rows and sections of the receiver.
- (void)endUpdates
You call this method to bracket a series of method calls that began with beginUpdates and that consist of operations to insert, delete, select, and reload rows and sections of the table view. When you call endUpdates, UITableView animates the operations simultaneously. Invocations of beginUpdates and endUpdates can be nested. If you do not make the insertion, deletion, and selection calls inside this block, table attributes such as row count might become invalid.
UITableView.hReturns an index path representing the row and section of a given table-view cell.
- (NSIndexPath *)indexPathForCell:(UITableViewCell *)cell
A cell object of the table view.
An index path representing the row and section of the cell or nil if the index path is invalid.
UITableView.hReturns an index path identifying the row and section at the given point.
- (NSIndexPath *)indexPathForRowAtPoint:(CGPoint)point
A point in the local coordinate system of the receiver (the table viewâs bounds).
An index path representing the row and section associated with point or nil if the point is out of the bounds of any row.
UITableView.hReturns an index path identifying the row and section of the selected row.
- (NSIndexPath *)indexPathForSelectedRow
An index path identifying the row and section indexes of the selected row or nil if the index path is invalid.
UITableView.hAn array of index paths each representing a row enclosed by a given rectangle.
- (NSArray *)indexPathsForRowsInRect:(CGRect)rect
A rectangle defining an area of the table view in local coordinates.
An array of NSIndexPath objects each representing a row and section index identifying a row within rect. Returns nil if rect is not valid.
UITableView.hReturns an array of index paths each identifying a visible row in the receiver.
- (NSArray *)indexPathsForVisibleRows
An array of NSIndexPath objects each representing a row index and section index that together identify a visible row in the table view. Returns nil if no rows are visible.
UITableView.hInitializes and returns a table view object having the given frame and style.
- (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
A rectangle specifying the initial location and size of the table view in its superviewâs coordinates. The frame of the table view changes as table cells are added and deleted.
A constant that specifies the style of the table view. See “Table View Style” for descriptions of valid constants.
Returns an initialized UITableView object or nil if the object could not be successfully initialized.
You must specify the style of a table view when you create it and you cannot thereafter modify the style. If you initialize the table view with the UIView method initWithFrame:, the UITableViewStylePlain style is used as a default.
UITableView.hInserts rows in the receiver at the locations identified by an array of index paths, with an option to animate the insertion.
- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
An array of NSIndexPath objects each representing a row index and section index that together identify a row in the table view.
A constant that either specifies the kind of animation to perform when inserting the cell or requests no animation. See “Table Cell Insertion and Deletion Animation” for descriptions of the constants.
UITableView calls the relevant delegate and data source methods immediately afterwards to get the cells and other content for visible cells.
Note the behavior of this method when it is called in an animation block defined by the lbeginUpdates and endUpdates methods. UITableView defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This happens regardless of ordering of the insertion and deletion method calls. This is unlike inserting or removing an item in a mutable array, where the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see “Batch Insertion and Deletion of Rows and Sections” in Table View Programming Guide for iPhone OS.
– insertSections:withRowAnimation:– deleteRowsAtIndexPaths:withRowAnimation:– reloadRowsAtIndexPaths:withRowAnimation:UITableView.hInserts one or more sections in the receiver, with an option to animate the insertion.
- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
An index set that specifies the sections to insert in the receiving table view. If a section already exists at the specified index location, it is moved down one index location.
A constant that indicates how the insertion is to be animated, for example, fade in or slide in from the left. See “Table Cell Insertion and Deletion Animation” for descriptions of these constants.
UITableView calls the relevant delegate and data source methods immediately afterwards to get the cells and other content for visible cells.
Note the behavior of this method when it is called in an animation block defined by the lbeginUpdates and endUpdates methods. UITableView defers any insertions of rows or sections until after it has handled the deletions of rows or sections. This happens regardless of ordering of the insertion and deletion method calls. This is unlike inserting or removing an item in a mutable array, where the operation can affect the array index used for the successive insertion or removal operation. For more on this subject, see “Batch Insertion and Deletion of Rows and Sections” in Table View Programming Guide for iPhone OS.
– insertRowsAtIndexPaths:withRowAnimation:– deleteSections:withRowAnimation:– reloadSections:withRowAnimation:UITableView.hReturns the number of rows (table cells) in a specified section.
- (NSInteger)numberOfRowsInSection:(NSInteger)section
An index number that identifies a section of the table. Table views in a plain style have a section index of zero.
An index number that identifies a row in the given section.
UITableView gets the value returned by this method from its data source and caches it.
UITableView.hReturns the number of sections for the receiver.
- (NSInteger)numberOfSections
The number of sections in the table view.
UITableView gets the value returned by this method from its data source and caches it.
UITableView.hReturns the drawing area for the footer of the specified section.
- (CGRect)rectForFooterInSection:(NSInteger)section
An index number identifying a section of the table view. Plain-style table views always have a section index of zero.
A rectangle defining the area in which the table view draws the section footer.
UITableView.hReturns the drawing area for the header of the specified section.
- (CGRect)rectForHeaderInSection:(NSInteger)section
An index number identifying a section of the table view. Plain-style table views always have a section index of zero.
A rectangle defining the area in which the table view draws the section header.
UITableView.hReturns the drawing area for a row identified by index path.
- (CGRect)rectForRowAtIndexPath:(NSIndexPath *)indexPath
An index path object that identifies a row by its index and its section index.
A rectangle defining the area in which the table view draws the row or CGRectZero if indexPath is invalid.
UITableView.hReturns the drawing area for a specified section of the receiver.
- (CGRect)rectForSection:(NSInteger)section
An index number identifying a section of the table view. Plain-style table views always have a section index of zero.
A rectangle defining the area in which the table view draws the section.
UITableView.hReloads the rows and sections of the receiver.
- (void)reloadData
Call this method to reload all the data that is used to construct the table, including cells, section headers and footers, index arrays, and so on. For efficiency, the table view redisplays only those rows that are visible. It adjusts offsets if the table shrinks as a result of the reload. The table viewâs delegate or data source calls this method when it wants the table view to completely reload its data. It should not be called in the methods that insert or delete rows, especially within an animation block implemented with calls to beginUpdates and endUpdates
UITableView.hReloads the specified rows using a certain animation effect.
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
An array of NSIndexPath objects identifying the rows to reload.
A constant that indicates how the reloading is to be animated, for example, fade out or slide out from the bottom. See “Table Cell Insertion and Deletion Animation” for descriptions of these constants.
The animation constant affects the direction in which both the old and the new rows slide. For example, if the animation constant is UITableViewRowAnimationRight, the old rows slide out to the right and the new cells slide in from the right.
Reloading a row causes the table view to ask its data source for a new cell for that row. The table animates that new cell in as it animates the old row out. Call this method if you want to alert the user that the value of a cell is changing. If, however, notifying the user is not important—that is, you just want to change the value that a cell is displaying—you can get the cell for a particular row and set its new value.
UITableView.hReloads the items in the index bar along the right side of the table view.
- (void)reloadSectionIndexTitles
This method gives you a way to update the section index after inserting or deleting sections without having to reload the whole table.
– sectionIndexTitlesForTableView: (UITableViewDataSource)UITableView.hReloads the specified sections using a given animation effect.
- (void)reloadSections:(NSIndexSet *)sectionswithRowAnimation:(UITableViewRowAnimation)animation
An index set identifying the sections to reload.
A constant that indicates how the reloading is to be animated, for example, fade out or slide out from the bottom. See “Table Cell Insertion and Deletion Animation” for descriptions of these constants.
The animation constant affects the direction in which both the old and the new section rows slide. For example, if the animation constant is UITableViewRowAnimationRight, the old rows slide out to the right and the new cells slide in from the right.
Calling this method causes the table view to ask its data source for new cells for the specified sections. The table view animates the insertion of new cells in as it animates the old cells out. Call this method if you want to alert the user that the values of the designated sections are changing. If, however, you just want to change values in cells of the specified sections without alerting the user, you can get those cells and directly set their new values.
UITableView.hScrolls the row nearest to a specified position in the table view to that position.
- (void)scrollToNearestSelectedRowAtScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated
A constant that identifies a relative position in the receiving table view (top, middle, bottom) for the row when scrolling concludes. See “Table View Scroll Position” a descriptions of valid constants.
YES if you want to animate the change in position, NO if it should be immediate.
UITableView.hScrolls the receiver until a row identified by index path is at a particular location on the screen.
- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated
An index path that identifies a row in the table view by its row index and its section index.
A constant that identifies a relative position in the receiving table view (top, middle, bottom) for row when scrolling concludes. See “Table View Scroll Position” a descriptions of valid constants.
YES if you want to animate the change in position, NO if it should be immediate.
Invoking this method does not cause the delegate to receive a scrollViewDidScroll: message, as is normal for programmatically-invoked user interface operations.
UITableView.hSelects a row in the receiver identified by index path, optionally scrolling the row to a location in the receiver.
- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UITableViewScrollPosition)scrollPosition
An index path identifying a row in the receiver.
YES if you want to animate the selection and any change in position, NO if the change should be immediate.
A constant that identifies a relative position in the receiving table view (top, middle, bottom) for the row when scrolling concludes. See “Table View Scroll Position” a descriptions of valid constants.
Calling this method does not cause the delegate to receive a tableView:willSelectRowAtIndexPath: or tableView:didSelectRowAtIndexPath: message, nor will it send UITableViewSelectionDidChangeNotification notifications to observers.
UITableView.hToggles the receiver into and out of editing mode.
- (void)setEditing:(BOOL)editing animated:(BOOL)animate
YES to enter editing mode, NO to leave it. The default value is NO .
YES to animate the transition to editing mode, NO to make the transition immediate.
When you call this method with the value of editing set to YES, the table view goes into editing mode by calling setEditing:animated: on each visible UITableViewCell object. Calling this method with editing set to NO turns off editing mode. In editing mode, the cells of the table might show an insertion or deletion control on the left side of each cell and a reordering control on the right side, depending on how the cell is configured. (See UITableViewCell Class Reference for details.) The data source of the table view can selectively exclude cells from editing mode by implementing tableView:canEditRowAtIndexPath:.
UITableView.hReturns the table cells that are visible in the receiver.
- (NSArray *)visibleCells
An array containing UITableViewCell objects, each representing a visible cell in the receiving table view.
UITableView.hThe style of the table view.
typedef enum {
UITableViewStylePlain,
UITableViewStyleGrouped
} UITableViewStyle;
UITableViewStylePlainA plain table view. Any section headers or footers are displayed as inline separators and float when the table view is scrolled.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewStyleGroupedA table view whose sections present distinct groups of rows. The section headers and footers do not float.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
You set the table style when you initialize the table view (see initWithFrame:style:). You cannot modify the style thereafter.
UITableView.hThe position in the table view (top, middle, bottom) to which a given row is scrolled.
typedef enum {
UITableViewScrollPositionNone,
UITableViewScrollPositionTop,
UITableViewScrollPositionMiddle,
UITableViewScrollPositionBottom
} UITableViewScrollPosition;
UITableViewScrollPositionNoneThe table view scrolls the row of interest to be fully visible with a minimum of movement. If the row is already fully visible, no scrolling occurs. For example, if the row is above the visible area, the behavior is identical to that specified by UITableViewScrollPositionTop. This is the default.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewScrollPositionTopThe table view scrolls the row of interest to the top of the visible table view.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewScrollPositionMiddleThe table view scrolls the row of interest to the middle of the visible table view.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewScrollPositionBottomThe table view scrolls the row of interest to the bottom of the visible table view.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
You set the scroll position through a parameter of the selectRowAtIndexPath:animated:scrollPosition:, scrollToNearestSelectedRowAtScrollPosition:animated:, cellForRowAtIndexPath:, and indexPathForSelectedRow methods.
UITableView.hThe type of animation when rows are inserted or deleted.
typedef struct {
UITableViewRowAnimationFade,
UITableViewRowAnimationRight,
UITableViewRowAnimationLeft,
UITableViewRowAnimationTop,
UITableViewRowAnimationBottom,
UITableViewRowAnimationNone
} UITableViewRowAnimation;
UITableViewRowAnimationFadeThe inserted or deleted row or rows fades into or out of the table view.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewRowAnimationRightThe inserted row or rows slides in from the right; the deleted row or rows slides out to the right.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewRowAnimationLeftThe inserted row or rows slides in from the left; the deleted row or rows slides out to the left.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewRowAnimationTopThe inserted row or rows slides in from the top; the deleted row or rows slides out toward the top.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewRowAnimationBottomThe inserted row or rows slides in from the bottom; the deleted row or rows slides out toward the bottom.
Available in iPhone OS 2.0 and later.
Declared in UITableView.h.
UITableViewRowAnimationNoneNo animation is performed. The new cell value appears as if the cell had just been reloaded.
Available in iPhone OS 3.0 and later.
Declared in UITableView.h.
You specify one of these constants as a parameter of the insertRowsAtIndexPaths:withRowAnimation:, insertSections:withRowAnimation:, deleteRowsAtIndexPaths:withRowAnimation:,deleteSections:withRowAnimation:, reloadRowsAtIndexPaths:withRowAnimation:, and reloadSections:withRowAnimation: methods.
UITableView.hRequests icon to be shown in the section index of a table view.
UIKIT_EXTERN NSString *const UITableViewIndexSearch;
UITableViewIndexSearchIf the data source includes this constant string in the array of strings it returns in sectionIndexTitlesForTableView:, the section index displays a magnifying glass icon at the corresponding index location. This location should generally be the first title in the index.
Available in iPhone OS 3.0 and later.
Declared in UITableView.h.
Posted when the selected row in the posting table view changes.
There is no userInfo dictionary associated with this notification.
UITableView.hLast updated: 2009-11-17