Skip to content

Instantly share code, notes, and snippets.

View idevsoftware's full-sized avatar

iDev Software idevsoftware

View GitHub Profile
@idevsoftware
idevsoftware / xcode-build-version-number.sh
Created July 13, 2016 02:46
Run Script Build Phase for Xcode to automatically increase CFBundleVersion
#!/bin/bash
# Run Script Build Phase for Xcode to automatically increase the CFBundleVersion value
# on your target's Info.plist using a 'yymmddHHMMSS' style timestamp.
# Also, sets a custom key with the current git commit hash (GIT_COMMIT_HASH)
#
# This script works by modifying the target copy of your Info.plist file, so that it won't
# change your original Info.plist which is under version control. It does, however, use
# the original file to read the initial CFBundleVersion value to which the timestamp
# for the current date/time is appended.
- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item {
// ...
if(shouldPop) {
dispatch_async(dispatch_get_main_queue(), ^{
[self popViewControllerAnimated:YES];
});
} else {
for(UIView *subview in [navigationBar subviews])
if(subview.alpha < 1)
[UIView animateWithDuration:.25