iOS Dev Nugget 92 Text Notifications Over Status Bar or Navigation Bar


Need to run a code review on your codebase? Hire me

Ever wanted to show some notification or information label briefly overlaid on the status bar (like Mailbox app) or navigation bar area?

CRToast is a library that lets you do that. There's an animatics on the page that gives a good idea of what it does.

Sample code included:

NSDictionary *options = @{
                          kCRToastTextKey : @"Hello World!",
                          kCRToastTextAlignmentKey : @(NSTextAlignmentCenter),
                          kCRToastBackgroundColorKey : [UIColor redColor],
                          kCRToastAnimationInTypeKey : @(CRToastAnimationTypeGravity),
                          kCRToastAnimationOutTypeKey : @(CRToastAnimationTypeGravity),
                          kCRToastAnimationInDirectionKey : @(CRToastAnimationDirectionLeft),
                          kCRToastAnimationOutDirectionKey : @(CRToastAnimationDirectionRight)
[CRToastManager showNotificationWithOptions:options

It’s short and direct.

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No


Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter


View archives of past issues