![]() |
API 0.9.5
|
#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: |
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.
| - (void) addItem: | (CPAccordionViewItem) | anItem |
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 |
Definition at line 219 of file CPAccordionView.j.
| - (void) collapseItemAtIndex: | (CPInteger) | anIndex |
Definition at line 192 of file CPAccordionView.j.
| - (CPIndexSet) expandedItemIndexes |
Definition at line 214 of file CPAccordionView.j.
| - (void) expandItemAtIndex: | (CPInteger) | anIndex |
Definition at line 181 of file CPAccordionView.j.
| - (id) initWithFrame: | (CGRect) | aFrame |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPView.
Definition at line 92 of file CPAccordionView.j.
| - (void) insertItem: | (CPAccordionViewItem) | anItem | |
| atIndex: | (CPInteger) | anIndex | |
Definition at line 132 of file CPAccordionView.j.
| - (CPView) itemHeaderPrototype |
Definition at line 113 of file CPAccordionView.j.
| - (CPArray) items |
Definition at line 118 of file CPAccordionView.j.
| - (void) layoutSubviews |
Reimplemented from CPView.
Definition at line 262 of file CPAccordionView.j.
| - (void) removeAllItems |
Definition at line 173 of file CPAccordionView.j.
| - (void) removeItem: | (CPAccordionViewItem) | anItem |
Definition at line 153 of file CPAccordionView.j.
| - (void) removeItemAtIndex: | (CPInteger) | anIndex |
Definition at line 158 of file CPAccordionView.j.
| - (void) setEnabled: | (BOOL) | isEnabled | |
| forItemAtIndex: | (CPInteger) | anIndex | |
Definition at line 228 of file CPAccordionView.j.
| - (void) setFrameSize: | (CGSize) | aSize |
Sets the receiver's frame size. If aSize is the same as the frame's current dimensions, this method simply returns. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so.
| aSize | the new size for the frame |
Reimplemented from CPView.
Definition at line 252 of file CPAccordionView.j.
| - (void) setItemHeaderPrototype: | (CPView) | aView |
Definition at line 108 of file CPAccordionView.j.
| - (void) toggleItemAtIndex: | (CPInteger) | anIndex |
Definition at line 203 of file CPAccordionView.j.