-
-
Save onlyyoujack/2383840 to your computer and use it in GitHub Desktop.
Using C99 for clever and non-fragile UITableView configuration. Allows implicit defaults. Copypasta’d from a screencap tweeted by @jonsterling: http://twitpic.com/80uyfp
This file contains 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
typedef enum { | |
kAccomplishmentTitleSection = 0, | |
kAccomplishmentCategorySection, | |
kNumberOfSections | |
} NESTemplateEditTableSections; | |
static NSString * const kCellIdentifiers[] = { | |
[kAccomplishmentTitleSection] = @"AccomplishmentTitleCell", | |
[kAccomplishmentCategorySection] = @"AccomplishmentCategoryCell" | |
}; | |
static UITableViewCellSelectionStyle const kCellSelectionStyles[] = { | |
[kAccomplishmentTitleSection] = UITableViewCellSelectionStyleBlue, | |
[kAccomplishmentCategorySection] = UITableViewCellSelectionStyleNone | |
}; | |
static UITableViewCellAccesoryType const kCellAccesoryTypes[] = { | |
[kAccomplishmentCategorySection] = UITableViewCellAccessoryDisclosureIndicator | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment