Last active
August 5, 2017 23:54
-
-
Save AhiyaHiya/27614ec4780482c79f7afc7d75838433 to your computer and use it in GitHub Desktop.
A function I use to update version string on the layout.
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
| @implementation VersionStringDemo | |
| - (void)updateVersionLabel | |
| { | |
| NSString* version = | |
| [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; | |
| NSString* build = | |
| [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey]; | |
| NSString* versionString = [NSString stringWithFormat:@"Version: %@ Build: %@", version, build]; | |
| [_versionLabel setText:versionString]; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment