Skip to content

Instantly share code, notes, and snippets.

@jungchris
Created August 20, 2015 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jungchris/eb96340d5fee9ec7a7ff to your computer and use it in GitHub Desktop.
Save jungchris/eb96340d5fee9ec7a7ff to your computer and use it in GitHub Desktop.
Capitalizing Notification Name
NSString *notificationName = [CCJNotificationEngine notificationTargetRandomizer];
NSString *notificationTitle;
if (notificationName) {
if (notificationName.length > 1) {
// NSString *uppercaseFirstLetter = [notificationName stringByReplacingCharactersInRange:NSMakeRange(0,1)
// withString:[[notificationName substringToIndex:1] capitalizedString]];
// notificationTitle = [@"View" stringByAppendingString:uppercaseFirstLetter];
notificationTitle = [self notificationTitleUsingNotificationName:notificationName];
} else {
notificationTitle = @"View Notification";
}
NSLog(@"adding notification");
[CCJNotificationEngine addLocalAlertNamed:notificationName withTitle:notificationTitle inHours:randomHour andMinutes:randomMinute];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment