Skip to content

Instantly share code, notes, and snippets.

Created June 5, 2013 17:04
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 anonymous/5715510 to your computer and use it in GitHub Desktop.
Save anonymous/5715510 to your computer and use it in GitHub Desktop.
#import "TSMessage.h"
@interface SubclassExample : TSMessage
@end
#import "SubclassExample.h"
@implementation SubclassExample
+ (CGFloat)navigationbarBottomOfViewController:(UIViewController *)viewController
{
return 50;
}
@end
//then in your example project using it on the message notification
- (IBAction)didTapMessage:(id)sender
{
NSString *notificationTitle = NSLocalizedString(@"Tell the user something", nil);
NSString *notificationDescription = (self.descriptionToggle.on ?
NSLocalizedString(@"This is some neutral notification.", nil) :
nil);
CGFloat duration = (self.longDurationToggle.on ? TSSecondViewControllerLongDuration : 0.0);
[SubclassExample showNotificationInViewController:self
withTitle:notificationTitle
withMessage:notificationDescription
withType:TSMessageNotificationTypeMessage
withDuration:duration
withCallback:nil
atPosition:(self.onBottomToggle.on ? TSMessageNotificationPositionBottom : TSMessageNotificationPositionTop)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment