CatNiP -test sprint-4-interim
catnip
IMSLPDelegateDataSource Class Reference

#import <IMSLPDelegateDataSource.h>

List of all members.

Public Member Functions

(id) - initWithMaster:
(NSInteger) - numberOfSectionsInTableView:
(void) - tableView:moveRowAtIndexPath:toIndexPath:
(BOOL) - tableView:canMoveRowAtIndexPath:
(NSInteger) - tableView:numberOfRowsInSection:
(UITableViewCell *) - tableView:cellForRowAtIndexPath:
(BOOL) - tableView:canEditRowAtIndexPath:
(void) - tableView:commitEditingStyle:forRowAtIndexPath:
(UITableViewCell *) - cellForRowAtLeftTable:
(UITableViewCell *) - cellForRowAtRightTable:
(void) - tableView:didSelectRowAtIndexPath:
(CGFloat) - tableView:heightForRowAtIndexPath:
(void) - didSelectRowAtLeftTable:
(void) - didSelectRowAtRightTable:

Protected Attributes

CatNiPViewControllermaster

Properties

IBOutlet CatNiPViewControllermaster
NSMutableArray * composers
NSMutableArray * compositions

Member Function Documentation

- (UITableViewCell *) cellForRowAtLeftTable: (NSIndexPath *)  indexPath

Prototype for libraryTableViewLeft: indexPath function.

Creates standard cell for application and assigns cell.textLabel.text = [composers objectAtIndex:[indexPath row]].

Parameters:
cellForRowAtLeftTableindexPath for cell to be created in left table
Returns:
UITableViewCell for given parametres
- (UITableViewCell *) cellForRowAtRightTable: (NSIndexPath *)  indexPath

Prototype for libraryTableViewRight: indexPath function.

Creates standard cell for application and assigns cell.textLabel.text = [compositions objectAtIndex:[indexPath row]].

Parameters:
cellForRowAtRightTablefor cell to be created in right table
Returns:
UITableViewCell for given parametres
- (void) didSelectRowAtLeftTable: (NSIndexPath *)  indexPath

libraryTableViewLeft's implementation: indexPath.

Shows libraryViewRight if hidden and reloads it's data.

Parameters:
didSelectRowAtLeftTablechoosing the left library table
- (void) didSelectRowAtRightTable: (NSIndexPath *)  indexPath

libraryTableViewRight's implementation: indexPath.

Using gesture recognizer initialized in viewDidLoad instead to prevent popping ScorePopoverController in new UIPopoverController with every search in libraryTableViewRight.

Parameters:
didSelectRowAtRightTablelocating the new selected row in libraryTableViewRight
- (id) initWithMaster: (CatNiPViewController *)  m
- (NSInteger) numberOfSectionsInTableView: (UITableView *)  tableView

UITableViewDataSource protocol function's dummy implementation.

Parameters:
numberOfSectionsInTableView
Returns:
value 1 cause each tableView has one section
- (BOOL) tableView: (UITableView *)  tableView
canEditRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDataSource function's implementation

dummy implementation. Check framework's API if you want to add functionality in here.

Returns:
NO;
- (BOOL) tableView: (UITableView *)  tableView
canMoveRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDataSource function's implementation

dummy implementation. Check framework's API if you want to add functionality in here.

Returns:
NO;
- (UITableViewCell *) tableView: (UITableView *)  tableView
cellForRowAtIndexPath: (NSIndexPath *)  indexPath 

Mandatory UITableViewDataSource function's implementation

Calls proper UITableView's tableView:cellForRowAtIndexPath for which the cell is needed.

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight
cellForRowAtIndexPathindexPath for cell to be created in tableView
Returns:
UITableViewCell for given parametres
- (void) tableView: (UITableView *)  tableView
commitEditingStyle: (UITableViewCellEditingStyle)  editingStyle
forRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDataSource function's implementation

dummy implementation. Check framework's API if you want to add functionality in here.

- (void) tableView: (UITableView *)  tableView
didSelectRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDelegate protocol function's implementation.

Calls spesified tableView's handler to determine behaviour. Check framework's API for details.

Parameters:
tableViewobject informing the delegate about the new row selection.
didSelectRowAtIndexPathlocating the new selected row in tableView
- (CGFloat) tableView: (UITableView *)  tableView
heightForRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDelegate protocol function's implementation.

Calculate table's row height dynamically based on cell.textLabel.text length. Height is calculated with following formula: (([cell.textLabel.text length] / 34) * 17) + 50

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight for which the height is calculated
heightForRowAtIndexPaththe row for which the height is calculated
Returns:
row's height in CGFloat type
- (void) tableView: (UITableView *)  tableView
moveRowAtIndexPath: (NSIndexPath *)  fromIndexPath
toIndexPath: (NSIndexPath *)  toIndexPath 

UITableViewDataSource function's implementation

dummy implementation. Check framework's API if you want to add functionality in here.

- (NSInteger) tableView: (UITableView *)  tableView
numberOfRowsInSection: (NSInteger)  section 

Mandatory UITableViewDataSource protocol function's implementation.

placeholder function for prototype

Parameters:
tableViewlibraryTableViewLeft or libraryTableViewRight
numberOfRowsInSection
Returns:
number of composers in a section if libraryTableViewLeft is chosen
number of compositions in a section if libraryTableViewRight is chosen

Member Data Documentation

- (CatNiPViewController*) master [protected]

Property Documentation

- (NSMutableArray *) composers [read, write, copy]
- (NSMutableArray *) compositions [read, write, copy]
- (IBOutlet CatNiPViewController*) master [read, write, retain]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Properties Defines