Created
June 5, 2013 17:04
-
-
Save anonymous/5715510 to your computer and use it in GitHub Desktop.
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
#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