API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CPAccordionView Class Reference

#import <CPAccordionView.h>

+ Inheritance diagram for CPAccordionView:

Instance Methods

(void) - addItem:
 
(CPIndexSet- collapsedItemIndexes
 
(void) - collapseItemAtIndex:
 
(CPIndexSet- expandedItemIndexes
 
(void) - expandItemAtIndex:
 
(id) - initWithFrame:
 
(void) - insertItem:atIndex:
 
(CPView- itemHeaderPrototype
 
(CPArray) - items
 
(void) - layoutSubviews
 
(void) - removeAllItems
 
(void) - removeItem:
 
(void) - removeItemAtIndex:
 
(void) - setEnabled:forItemAtIndex:
 
(void) - setFrameSize:
 
(void) - setItemHeaderPrototype:
 
(void) - toggleItemAtIndex:
 

Detailed Description

CPAccordionView provides a container for CPAccordionViewItem objects and manages layout state for all sub-layout items.

Example

var myAccordionView = [[CPAccordionView alloc] initWithFrame:CGRectMakeZero()];
var firstItem = [[CPAccordionViewItem alloc] initWithIdentifier:"firstSection"]];
[firstItem setView:[[CPView alloc] initWithFrame:CGRectMakeZero()]];
var secondItem = [[CPAccordionViewItem alloc] initWithIdentifier:"secondSection"]];
[secondItem setView:[[CPView alloc] initWithFrame:CGRectMakeZero()]];
[myAccordionView addItem:firstItem];
[myAccordionView addItem:secondItem];
[myAccordionView setAutoresizingMask: CPViewWidthSizable | CPViewHeightSizable];
  

Definition at line 2 of file CPAccordionView.h.

Method Documentation

- (void) addItem: (CPAccordionViewItem anItem
implementation

Append a CPAccordionViewItem to the receiver. Note that the CPAccordionViewItem must contain a valid CPView derived component or a TypeError will be generated when the contents of the ViewItem are disclosed.

Definition at line 127 of file CPAccordionView.j.

- (CPIndexSet) collapsedItemIndexes
implementation

Definition at line 219 of file CPAccordionView.j.

- (void) collapseItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 192 of file CPAccordionView.j.

- (CPIndexSet) expandedItemIndexes
implementation

Definition at line 214 of file CPAccordionView.j.

- (void) expandItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 181 of file CPAccordionView.j.

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes the receiver for usage with the specified bounding rectangle

Returns
the initialized view

Definition at line 92 of file CPAccordionView.j.

- (void) insertItem: (CPAccordionViewItem anItem
atIndex: (CPInteger)  anIndex 
implementation

Definition at line 132 of file CPAccordionView.j.

- (CPView) itemHeaderPrototype
implementation

Definition at line 113 of file CPAccordionView.j.

- (CPArray) items
implementation

Definition at line 118 of file CPAccordionView.j.

- (void) layoutSubviews
implementation

Definition at line 262 of file CPAccordionView.j.

- (void) removeAllItems
implementation

Definition at line 173 of file CPAccordionView.j.

- (void) removeItem: (CPAccordionViewItem anItem
implementation

Definition at line 153 of file CPAccordionView.j.

- (void) removeItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 158 of file CPAccordionView.j.

- (void) setEnabled: (BOOL)  isEnabled
forItemAtIndex: (CPInteger)  anIndex 
implementation

Definition at line 228 of file CPAccordionView.j.

- (void) setFrameSize: (CGSize)  aSize
implementation

Definition at line 252 of file CPAccordionView.j.

- (void) setItemHeaderPrototype: (CPView aView
implementation

Definition at line 108 of file CPAccordionView.j.

- (void) toggleItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 203 of file CPAccordionView.j.


The documentation for this class was generated from the following files: