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

#import <DetailPopoverController.h>

List of all members.

Public Member Functions

(id) - initWithStyle:masterController:dictionary:
(UITableViewCell *) - tableView:cellForRowAtIndexPath:
(NSInteger) - tableView:numberOfRowsInSection:
(NSInteger) - numberOfSectionsInTableView:
(CGFloat) - tableView:heightForRowAtIndexPath:
(CGFloat) - tableView:heightForHeaderInSection:
(UIView *) - tableView:viewForHeaderInSection:

Protected Attributes

UITableView * detailTableView
CatNiPViewControllermaster

Properties

IBOutlet UITableView * detailTableView
NSString * composer
NSString * composition
NSString * scoreName
NSDictionary * metaDataDict
NSArray * sortedKeys
IBOutlet CatNiPViewControllermaster

Member Function Documentation

- (id) initWithStyle: (UITableViewStyle)  style
masterController: (CatNiPViewController *)  controller
dictionary: (NSDictionary *)  dict 

Basic init for DETAILPopoverController, sets masterController = controller

Parameters:
initWithStyle,:check framework's API for UITableViewStyles
masterControllermaster viewController in which this popover is represented.
Returns:
id
- (NSInteger) numberOfSectionsInTableView: (UITableView *)  tableView

UITableViewDatasource protocol function's implementation

Returns 1

Parameters:
numberOfSectionInTableViewdetailTableView
Returns:
returns 1
- (UITableViewCell *) tableView: (UITableView *)  tableView
cellForRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDatasource protocol function's implementation

Parameters:
tableViewdetailTableView
cellForRowAtIndexPathindexPath for cell to be created
Returns:
created cell for given arguments
- (CGFloat) tableView: (UITableView *)  tableView
heightForHeaderInSection: (NSInteger)  section 

UITableViewDelegate protocol function's implementation

Returns 23

Parameters:
tableViewdetailTableView
heightForHeaderInSectionSection 0 = composer, 1 = composition, 2 = scoreName and 3 = otherInfo
Returns:
returns 23 as CGFloat
- (CGFloat) tableView: (UITableView *)  tableView
heightForRowAtIndexPath: (NSIndexPath *)  indexPath 

UITableViewDelegate protocol function's implementation

Calculate row's height based on cell.textLabel.text's length. Calculation formula is: (((int)(length / 55)+1) * 17) + 50;

Parameters:
tableViewdetailTableView
indexPathSection 0 = composer, 1 = composition, 2 = scoreName and 3 = otherInfo.
Returns:
height of row as CGFloat
- (NSInteger) tableView: (UITableView *)  tableView
numberOfRowsInSection: (NSInteger)  section 

UITableViewDatasource protocol function's implementation

Returns 1

Parameters:
tableViewdetailTableView
numberOfRowsInSectiononly one row in each section
Returns:
return 1
- (UIView *) tableView: (UITableView *)  tableView
viewForHeaderInSection: (NSInteger)  section 

UITableViewDelegate protocol function's implementation

Creates UILabel with text indicating the information about the score that is represented in the section. Texts for sections: 0 = Composer, 1 = Composition, 2 = Score name and 3 = Info;

Parameters:
tableViewdetailTableView
viewForHeaderInSectionSection 0 = composer, 1 = composition, 2 = scoreName and 3 = otherInfo
Returns:
returns UILabel representing the sections info

Member Data Documentation

- (UITableView*) detailTableView [protected]
- (CatNiPViewController*) master [protected]

Property Documentation

- (NSString *) composer [read, write, retain]
- (NSString *) composition [read, write, retain]
- (IBOutlet UITableView*) detailTableView [read, write, retain]
- (IBOutlet CatNiPViewController*) master [read, write, retain]
- (NSDictionary *) metaDataDict [read, write, copy]
- (NSString *) scoreName [read, write, retain]
- (NSArray *) sortedKeys [read, write, retain]

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