This file contains 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
// Usage example: | |
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png | |
// | |
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]]; | |
// .h | |
@interface UIImage (IPImageUtils) | |
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color; | |
@end |
This file contains 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
-Weverything -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Woverlength-strings -Wshadow -Wundeclared-selector -Wunreachable-code -Wformat=2 -Woverriding-method-mismatch -Wno-objc-missing-property-synthesis -Wno-unused-parameter -Wno-covered-switch-default -Wno-direct-ivar-access -Wno-assign-enum -Wno-float-equal -Wno-switch-enum -Wno-implicit-retain-self -Wno-vla -Wno-pedantic -Wno-explicit-ownership-type -Wno-bad-function-cast -Wno-documentation-unknown-command -Wno-packed |
This file contains 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
# Set the build number to the current git commit count. | |
# | |
# Permanent home: | |
# https://gist.github.com/jaredsinclair/af6898f93674ee5923f3 | |
# | |
# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/ | |
# Updated with dSYM handling from http://yellowfeather.co.uk/blog/auto-incrementing-build-number-in-xcode-revisited/ | |
git=`sh /etc/profile; which git` | |
appBuild=`"$git" rev-list HEAD --count` |
This file contains 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
+ (NSString*)stringWithNewUUID { | |
CFUUIDRef uuidObj = CFUUIDCreate(nil); | |
NSString *newUUID = (__bridge_transfer NSString*)CFUUIDCreateString(nil, uuidObj); | |
CFRelease(uuidObj); | |
return newUUID; | |
} |
This file contains 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
static NSString * BLVFormFieldValidator_EmailRegex = @"(?i)(?:[a-z0-9!#$\%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$\%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"; |
This file contains 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
typedef NS_ENUM(NSInteger, BLVScrollDirection) { | |
// These are by the content offset, | |
// not by the direction your finger moves. | |
BLVScrollDirection_RightToLeft, | |
BLVScrollDirection_LeftToRight | |
}; | |
@interface BLVNonStandardPagingCalculation : NSObject | |
@property (nonatomic, assign) NSInteger centeredCardIndex; // Defaults to NSNotFound |
This file contains 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
post_install do |installer_representation| | |
installer_representation.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.to_s == 'Beta' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
elsif config.to_s == 'Release' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution' | |
end | |
end | |
end |
This file contains 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
// | |
// Warnings.xcconfig | |
// | |
// The list of warnings we (don’t) use, and the reasons why. | |
// | |
// :MARK: Warnings in use: | |
// :MARK: -everything | |
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us. | |
// | |
// :MARK: - Warnings not to be promoted: |
This file contains 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
ACTION = build | |
AD_HOC_CODE_SIGNING_ALLOWED = NO | |
ALTERNATE_GROUP = staff | |
ALTERNATE_MODE = u+w,go-w,a+rX | |
ALTERNATE_OWNER = grantdavis | |
ALWAYS_SEARCH_USER_PATHS = NO | |
ALWAYS_USE_SEPARATE_HEADERMAPS = YES | |
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer | |
APPLE_INTERNAL_DIR = /AppleInternal | |
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation |
This file contains 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
/// Quick-n-dirty translation of MWFeedParser's algorithm from Objective-C to Swift | |
/// seealso: https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m | |
public extension NSString { | |
public func byConvertingHTMLToPlainText() -> String { | |
let stopCharacters = CharacterSet(charactersIn: "< \t\n\r\(0x0085)\(0x000C)\(0x2028)\(0x2029)") | |
let newLineAndWhitespaceCharacters = CharacterSet(charactersIn: " \t\n\r\(0x0085)\(0x000C)\(0x2028)\(0x2029)") | |
let tagNameCharacters = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") | |
OlderNewer