- Index
- Hierarchy

# RETableViewSection Class Reference

Inherits from | NSObject
Declared in | RETableViewSection.h RETableViewSection.m

## Overview

Table view section.

## Tasks

### Other Methods

- `items`

  An array of section items (rows).

  property
- `headerTitle`

  The title of the header of the specified section of the table view.

  property
- `footerTitle`

  The title of the footer of the specified section of the table view.

  property
- `headerView`

  A view object to display in the header of the specified section of the table view.

  property
- `footerView`

  A view object to display in the footer of the specified section of the table view.

  property
- `tableViewManager`

  The title of of this section.

  property
- `index`

  Section index in UITableView.

  property

### Creating and Initializing a RETableViewSection

- `+ section`

  Creates and returns a new section.

- `+ sectionWithHeaderTitle:`

  Creates and returns a new section with predefined header title.

- `+ sectionWithHeaderTitle:footerTitle:`

  Creates and returns a new section with predefined header and footer titles.

- `+ sectionWithHeaderView:`

  Creates and returns a new section containing a header view.

- `+ sectionWithHeaderView:footerView:`

  Creates and returns a new section containing header and footer views.

- `– initWithHeaderTitle:`

  Initializes a newly allocated section and sets header title.

- `– initWithHeaderTitle:footerTitle:`

  Initializes a newly allocated section with header and footer titles.

- `– initWithHeaderView:`

  Initializes a newly allocated section containing a header view.

- `– initWithHeaderView:footerView:`

  Initializes a newly allocated section containing header and footer views.

### Adding Items

- `– addItem:`

  Inserts a given item at the end of the section.

- `– addItemsFromArray:`

  Adds the items contained in another given array to the end of the section.

- `– insertItem:atIndex:`

  Inserts a given item into the section at a given index.

- `– insertItems:atIndexes:`

  Inserts the items in the provided items array into the section at the specified indexes.

### Removing Items

- `– removeItem:`

  Removes all occurrences in the section of a given item.

- `– removeAllItems`

  Empties the section of all its items.

- `– removeItemIdenticalTo:inRange:`

  Removes all occurrences of item within the specified range in the section.

- `– removeItemIdenticalTo:`

  Removes all occurrences of a given item in the section.

- `– removeItemsInArray:`

  Removes from the section the items in another given array.

- `– removeItemsInRange:`

  Removes from the section each of the items within a given range.

- `– removeItem:inRange:`

  Removes all occurrences within a specified range in the section of a given item.

- `– removeLastItem`

  Removes the item with the highest-valued index in the section.

- `– removeItemAtIndex:`

  Removes the item at index.

- `– removeItemsAtIndexes:`

  Removes the items at the specified indexes from the section.

### Replacing Items

- `– replaceItemAtIndex:withItem:`

  Replaces the item at index with another item.

- `– replaceItemsWithItemsFromArray:`

  Replaces the items in the section with all of the items from a given array.

- `– replaceItemsAtIndexes:withItems:`

  Replaces the items in the section at specified locations specified with the items from a given array.

- `– replaceItemsInRange:withItemsFromArray:range:`

  Replaces the items in the section by one given range with the items in another array specified by another range.

- `– replaceItemsInRange:withItemsFromArray:`

  Replaces the items in the section specified by a given range with all of the items from a given array.

### Rearranging Items

- `– exchangeItemAtIndex:withItemAtIndex:`

  Exchanges the items in the section at given indices.

- `– sortItemsUsingFunction:context:`

  Sorts the items in ascending order as defined by the comparison function compare.

### Manipulating table view section

- `– reloadSectionWithAnimation:`

  Reloads the `section` using a given animation effect.

## Properties

### footerTitle

The title of the footer of the specified section of the table view.

`@property (copy, readwrite, nonatomic) NSString *footerTitle`

#### Discussion

The title of the footer of the specified section of the table view.

#### Declared In

`RETableViewSection.h`

### footerView

A view object to display in the footer of the specified section of the table view.

`@property (strong, readwrite, nonatomic) UIView *footerView`

#### Discussion

A view object to display in the footer of the specified section of the table view.

#### Declared In

`RETableViewSection.h`

### headerTitle

The title of the header of the specified section of the table view.

`@property (copy, readwrite, nonatomic) NSString *headerTitle`

#### Discussion

The title of the header of the specified section of the table view.

#### Declared In

`RETableViewSection.h`

### headerView

A view object to display in the header of the specified section of the table view.

`@property (strong, readwrite, nonatomic) UIView *headerView`

#### Discussion

A view object to display in the header of the specified section of the table view.

#### Declared In

`RETableViewSection.h`

### index

Section index in UITableView.

`@property (assign, readonly, nonatomic) NSUInteger index`

#### Discussion

Section index in UITableView.

#### Declared In

`RETableViewSection.h`

### items

An array of section items (rows).

`@property (strong, readwrite, nonatomic) NSMutableArray *items`

#### Discussion

An array of section items (rows).

#### Declared In

`RETableViewSection.h`

### tableViewManager

The title of of this section.

`@property (weak, readwrite, nonatomic) RETableViewManager *tableViewManager`

#### Discussion

The title of of this section.

#### Declared In

`RETableViewSection.h`

## Class Methods

### section

Creates and returns a new section.

`+ (id)section`

#### Return Value

A new section.

#### Discussion

Creates and returns a new section.

#### Declared In

`RETableViewSection.h`

### sectionWithHeaderTitle:

Creates and returns a new section with predefined header title.

`+ (id)sectionWithHeaderTitle:(NSString *)headerTitle`

#### Parameters

headerTitle

  A header title.

#### Return Value

A new section with defined header title.

#### Discussion

Creates and returns a new section with predefined header title.

#### Declared In

`RETableViewSection.h`

### sectionWithHeaderTitle:footerTitle:

Creates and returns a new section with predefined header and footer titles.

`+ (id)sectionWithHeaderTitle:(NSString *)headerTitle footerTitle:(NSString *)footerTitle`

#### Parameters

headerTitle

  A header title.

footerTitle

  A footer title.

#### Return Value

A new section with header and footer titles.

#### Discussion

Creates and returns a new section with predefined header and footer titles.

#### Declared In

`RETableViewSection.h`

### sectionWithHeaderView:

Creates and returns a new section containing a header view.

`+ (id)sectionWithHeaderView:(UIView *)headerView`

#### Parameters

headerView

  A header view.

#### Return Value

A new section containing a header view.

#### Discussion

Creates and returns a new section containing a header view.

#### Declared In

`RETableViewSection.h`

### sectionWithHeaderView:footerView:

Creates and returns a new section containing header and footer views.

`+ (id)sectionWithHeaderView:(UIView *)headerView footerView:(UIView *)footerView`

#### Parameters

headerView

  A header view.

footerView

  A footer view.

#### Return Value

A new section containing header and footer views.

#### Discussion

Creates and returns a new section containing header and footer views.

#### Declared In

`RETableViewSection.h`

## Instance Methods

### addItem:

Inserts a given item at the end of the section.

`- (void)addItem:(id)item`

#### Parameters

item

  The item to add to the end of the section. This value must not be `nil`.

#### Return Value

The item.

#### Discussion

Inserts a given item at the end of the section.

#### Declared In

`RETableViewSection.h`

### addItemsFromArray:

Adds the items contained in another given array to the end of the section.

`- (void)addItemsFromArray:(NSArray *)array`

#### Parameters

array

  An array of items to add to the end of the section.

#### Discussion

Adds the items contained in another given array to the end of the section.

#### Declared In

`RETableViewSection.h`

### exchangeItemAtIndex:withItemAtIndex:

Exchanges the items in the section at given indices.

`- (void)exchangeItemAtIndex:(NSUInteger)idx1 withItemAtIndex:(NSUInteger)idx2`

#### Parameters

idx1

  The index of the item with which to replace the item at index idx2.

idx2

  The index of the items with which to replace the item at index idx1.

#### Discussion

Exchanges the items in the section at given indices.

#### Declared In

`RETableViewSection.h`

### initWithHeaderTitle:

Initializes a newly allocated section and sets header title.

`- (id)initWithHeaderTitle:(NSString *)headerTitle`

#### Parameters

headerTitle

  A header title.

#### Return Value

A new section initialized with a header title.

#### Discussion

Initializes a newly allocated section and sets header title.

#### Declared In

`RETableViewSection.h`

### initWithHeaderTitle:footerTitle:

Initializes a newly allocated section with header and footer titles.

`- (id)initWithHeaderTitle:(NSString *)headerTitle footerTitle:(NSString *)footerTitle`

#### Parameters

headerTitle

  A header title.

footerTitle

  A footer title.

#### Return Value

A new section initialized with header and footer titles.

#### Discussion

Initializes a newly allocated section with header and footer titles.

#### Declared In

`RETableViewSection.h`

### initWithHeaderView:

Initializes a newly allocated section containing a header view.

`- (id)initWithHeaderView:(UIView *)headerView`

#### Parameters

headerView

  A header view.

#### Return Value

A new section initialized containing a header view.

#### Discussion

Initializes a newly allocated section containing a header view.

#### Declared In

`RETableViewSection.h`

### initWithHeaderView:footerView:

Initializes a newly allocated section containing header and footer views.

`- (id)initWithHeaderView:(UIView *)headerView footerView:(UIView *)footerView`

#### Parameters

headerView

  A header view.

footerView

  A footer view.

#### Return Value

A new section initialized with header and footer views.

#### Discussion

Initializes a newly allocated section containing header and footer views.

#### Declared In

`RETableViewSection.h`

### insertItem:atIndex:

Inserts a given item into the section at a given index.

`- (void)insertItem:(id)item atIndex:(NSUInteger)index`

#### Parameters

item

  The item to add to the section. This value must not be nil.

index

  The index in the section at which to insert item. This value must not be greater than the count of items in the section.

#### Discussion

Inserts a given item into the section at a given index.

#### Declared In

`RETableViewSection.h`

### insertItems:atIndexes:

Inserts the items in the provided items array into the section at the specified indexes.

`- (void)insertItems:(NSArray *)items atIndexes:(NSIndexSet *)indexes`

#### Parameters

items

  An array of items to insert into the section.

indexes

  The indexes at which the items should be inserted.

#### Discussion

Inserts the items in the provided items array into the section at the specified indexes.

#### Declared In

`RETableViewSection.h`

### reloadSectionWithAnimation:

Reloads the `section` using a given animation effect.

`- (void)reloadSectionWithAnimation:(UITableViewRowAnimation)animation`

#### Parameters

animation

  A constant that indicates how the reloading is to be animated

#### Discussion

Reloads the `section` using a given animation effect.

#### Declared In

`RETableViewSection.h`

### removeAllItems

Empties the section of all its items.

`- (void)removeAllItems`

#### Discussion

Empties the section of all its items.

#### Declared In

`RETableViewSection.h`

### removeItem:

Removes all occurrences in the section of a given item.

`- (void)removeItem:(id)item`

#### Parameters

item

  The item to remove from the section.

#### Discussion

Removes all occurrences in the section of a given item.

#### Declared In

`RETableViewSection.h`

### removeItem:inRange:

Removes all occurrences within a specified range in the section of a given item.

`- (void)removeItem:(id)item inRange:(NSRange)range`

#### Parameters

item

  The item to remove from the section.

range

  The range from which to remove item.

#### Discussion

Removes all occurrences within a specified range in the section of a given item.

#### Declared In

`RETableViewSection.h`

### removeItemAtIndex:

Removes the item at index.

`- (void)removeItemAtIndex:(NSUInteger)index`

#### Parameters

index

  The index from which to remove the item in the section. The value must not exceed the bounds of the section.

#### Discussion

Removes the item at index.

#### Declared In

`RETableViewSection.h`

### removeItemIdenticalTo:

Removes all occurrences of a given item in the section.

`- (void)removeItemIdenticalTo:(id)item`

#### Parameters

item

  The section to remove from the section.

#### Discussion

Removes all occurrences of a given item in the section.

#### Declared In

`RETableViewSection.h`

### removeItemIdenticalTo:inRange:

Removes all occurrences of item within the specified range in the section.

`- (void)removeItemIdenticalTo:(id)item inRange:(NSRange)range`

#### Parameters

item

  The item to remove from the section within range.

range

  The range in the section from which to remove section.

#### Discussion

Removes all occurrences of item within the specified range in the section.

#### Declared In

`RETableViewSection.h`

### removeItemsAtIndexes:

Removes the items at the specified indexes from the section.

`- (void)removeItemsAtIndexes:(NSIndexSet *)indexes`

#### Parameters

indexes

  The indexes of the items to remove from the section. The locations specified by indexes must lie within the bounds of the section.

#### Discussion

Removes the items at the specified indexes from the section.

#### Declared In

`RETableViewSection.h`

### removeItemsInArray:

Removes from the section the items in another given array.

`- (void)removeItemsInArray:(NSArray *)otherArray`

#### Parameters

otherArray

  An array containing the items to be removed from the section.

#### Discussion

Removes from the section the items in another given array.

#### Declared In

`RETableViewSection.h`

### removeItemsInRange:

Removes from the section each of the items within a given range.

`- (void)removeItemsInRange:(NSRange)range`

#### Parameters

range

  The range of the items to remove from the section.

#### Discussion

Removes from the section each of the items within a given range.

#### Declared In

`RETableViewSection.h`

### removeLastItem

Removes the item with the highest-valued index in the section.

`- (void)removeLastItem`

#### Discussion

Removes the item with the highest-valued index in the section.

#### Declared In

`RETableViewSection.h`

### replaceItemAtIndex:withItem:

Replaces the item at index with another item.

`- (void)replaceItemAtIndex:(NSUInteger)index withItem:(id)item`

#### Parameters

index

  The index of the item to be replaced. This value must not exceed the bounds of the section.

item

  The item with which to replace the item at index index in the section. This value must not be `nil`.

#### Discussion

Replaces the item at index with another item.

#### Declared In

`RETableViewSection.h`

### replaceItemsAtIndexes:withItems:

Replaces the items in the section at specified locations specified with the items from a given array.

`- (void)replaceItemsAtIndexes:(NSIndexSet *)indexes withItems:(NSArray *)items`

#### Parameters

indexes

  The indexes of the items to be replaced.

items

  The items with which to replace the items in the section at the indexes specified by `indexes`. The count of locations in indexes must equal the count of items.

#### Discussion

Replaces the items in the section at specified locations specified with the items from a given array.

#### Declared In

`RETableViewSection.h`

### replaceItemsInRange:withItemsFromArray:

Replaces the items in the section specified by a given range with all of the items from a given array.

`- (void)replaceItemsInRange:(NSRange)range withItemsFromArray:(NSArray *)otherArray`

#### Parameters

range

  The range of items to replace in (or remove from) the section.

otherArray

  The array of items from which to select replacements for the items in range.

#### Discussion

Replaces the items in the section specified by a given range with all of the items from a given array.

#### Declared In

`RETableViewSection.h`

### replaceItemsInRange:withItemsFromArray:range:

Replaces the items in the section by one given range with the items in another array specified by another range.

`- (void)replaceItemsInRange:(NSRange)range withItemsFromArray:(NSArray *)otherArray range:(NSRange)otherRange`

#### Parameters

range

  The range of items to replace in (or remove from) the section.

otherArray

  The array of items from which to select replacements for the items in range.

otherRange

  The range of items to select from otherArray as replacements for the items in range.

#### Discussion

Replaces the items in the section by one given range with the items in another array specified by another range.

#### Declared In

`RETableViewSection.h`

### replaceItemsWithItemsFromArray:

Replaces the items in the section with all of the items from a given array.

`- (void)replaceItemsWithItemsFromArray:(NSArray *)otherArray`

#### Parameters

otherArray

  The array of items from which to select replacements for the items.

#### Discussion

Replaces the items in the section with all of the items from a given array.

#### Declared In

`RETableViewSection.h`

### sortItemsUsingFunction:context:

Sorts the items in ascending order as defined by the comparison function compare.

`- (void)sortItemsUsingFunction:(NSInteger ( *) ( id , id , void *))compare context:(void *)context`

#### Parameters

compare

  The comparison function to use to compare two items at a time.

context

  The context argument to pass to the compare function.

#### Discussion

Sorts the items in ascending order as defined by the comparison function compare.

#### Declared In

`RETableViewSection.h`

- Index
- Hierarchy

© 2013 Roman Efimov. All rights reserved. (Last updated: 2013-07-23)
Generated by appledoc 2.1 (build 840).