Last active
December 14, 2015 07:59
-
-
Save helpshift/5054855 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- (void) notificationCountAsyncReceived:(NSInteger)count { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
[yourView setTextLabel:[NSString stringWithFormat:@"%d",count]; | |
}); | |
} |
This file contains hidden or 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
- (void) notificationCountAsyncReceived:(NSInteger)count { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
tabBarItem.badgeValue = [NSString stringWithFormat:@"%d",count]; | |
}); | |
} |
This file contains hidden or 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
NSInteger count = [[Helpshift sharedInstance] notificationCountAsync:false] |
This file contains hidden or 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
[yourView setTextLabel:[NSString stringWithFormat:@"%d",count]; |
This file contains hidden or 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
tabBarItem.badgeValue = [NSString stringWithFormat:@"%d",count]; |
This file contains hidden or 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
-(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