This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This would be inserted somewhere in your app-wide tableviewcontroller superclass configuration, to reap the benefits across all subsequent tables. | |
self.tableController.heightForHeaderInSection = 22; | |
self.tableController.onViewForHeaderInSection = ^UIView*(NSUInteger sectionIndex, NSString* sectionTitle) { | |
UIView* headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.bounds.size.width, 22)] autorelease]; | |
headerView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sectionheader_bg.png"]]; | |
UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, self.tableView.bounds.size.width, 22)]; | |
label.text = sectionTitle; | |
label.textColor = [UIColor whiteColor]; | |
label.backgroundColor = [UIColor clearColor]; | |
label.font = [UIFont boldSystemFontOfSize:12]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Open States API - Data for all state legislatures (well, 38 states so far) | |
* API documentation, method listing, and example GISTs at: | |
* http://openstates.sunlightlabs.com/api/ | |
* | |
* Base URL = http://openstates.sunlightlabs.com/api/v1 | |
* NOTE: All GET requests to this base URL must include an 'apikey' query parameter. | |
* | |
* My API key looks like this "/districts/tx?apikey=350284d0c6af453b9b56f6c1c7fea1f9" | |
* | |
* Resource Path Examples: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SLFLegislator : NSManagedObject | |
@property (nonatomic, retain) NSString * legID; // primary key | |
@property (nonatomic, retain) NSSet *positions; // to-many SLFCommitteePositions | |
@property (nonatomic, retain) NSString * suffixes; | |
@property (nonatomic, retain) NSString * party; | |
@property (nonatomic, retain) NSString * district; | |
@property (nonatomic, retain) NSNumber * active; | |
@property (nonatomic, retain) NSString * country; | |
@property (nonatomic, retain) NSString * stateID; |
NewerOlder