Created
August 20, 2015 18:29
-
-
Save jungchris/eb96340d5fee9ec7a7ff to your computer and use it in GitHub Desktop.
Capitalizing Notification Name
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
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