Skip to content

Instantly share code, notes, and snippets.

@thirtified
thirtified / xcode-git-version.sh
Created July 16, 2012 09:14 — forked from jpwatts/xcode-git-version.sh
This Xcode 4 build phase script automatically sets the version and short version string of an application bundle based on information from the containing Git repository.
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# - Uses version from latest git tag for CFBundleShortVersionString
# (e.g. 1.2.3 from "v1.2.3")
# - Uses combined string <commit number>.<short commit hash> for CFBundleVersion
# (e.g. 18.9d75e30)
#
@manmal
manmal / UIImageView+AFNetworkingFadeInAdditions.h
Last active August 27, 2017 17:31
Very minimalistic fade-in implementation for AFNetworking's UIImageView category. Thanks to @myellow and @merowing_.
#import <AFNetworking.h>
@interface UIImageView (AFNetworkingFadeInAdditions)
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage fadeInWithDuration:(CGFloat)duration;
@end
@redent
redent / TCCustomFont.m
Created December 6, 2013 18:56
Categories for specifying custom fonts in Interface Builder and Storyboard. More info here: http://stackoverflow.com/a/15155081/469218
#import <UIKit/UIKit.h>
@interface UIButton (TCCustomFont)
@property (nonatomic, copy) NSString* fontName;
@end
@implementation UIButton (TCCustomFont)
- (NSString *)fontName {
return self.titleLabel.font.fontName;