Skip to content

Instantly share code, notes, and snippets.

@helpshift
Last active December 14, 2015 07:59
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 helpshift/5054855 to your computer and use it in GitHub Desktop.
Save helpshift/5054855 to your computer and use it in GitHub Desktop.
- (void) notificationCountAsyncReceived:(NSInteger)count {
dispatch_async(dispatch_get_main_queue(), ^{
[yourView setTextLabel:[NSString stringWithFormat:@"%d",count];
});
}
- (void) notificationCountAsyncReceived:(NSInteger)count {
dispatch_async(dispatch_get_main_queue(), ^{
tabBarItem.badgeValue = [NSString stringWithFormat:@"%d",count];
});
}
NSInteger count = [[Helpshift sharedInstance] notificationCountAsync:false]
[yourView setTextLabel:[NSString stringWithFormat:@"%d",count];
tabBarItem.badgeValue = [NSString stringWithFormat:@"%d",count];
-(NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
{
return UIInterfaceOrientationMaskAll;
}
-(BOOL)shouldAutorotate
{
return NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment