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
#import <Foundation/Foundation.h> | |
#define NSRangeEnumerate(i, range) for(i = range.location; i < NSMaxRange(range); ++i) | |
@interface NSArray (ARLRange) | |
- (instancetype)initWithRange:(NSRange)range; | |
+ (instancetype)arrayWithRange:(NSRange)range; | |
@end |
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
UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(20, 20) | |
radius:10 | |
startAngle:-2 endAngle:3 | |
clockwise:YES]; | |
CAShapeLayer *layer = [[CAShapeLayer alloc] init]; | |
layer.frame = CGRectMake(0, 0, 40, 40); | |
layer.strokeColor = [UIColor grayColor].CGColor; | |
layer.fillColor = nil; | |
layer.lineWidth = 1; |
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
#import <UIKit/UIKit.h> | |
@interface NSNotification (KeyboardNotifications) | |
- (NSTimeInterval)keyboardAnimationDuration; | |
- (UIViewAnimationCurve)keyboardAnimationCurve; | |
- (CGRect)keyboardFrame; | |
- (void)animateSynchronouslyWithKeyboard:(void(^)(void))animation completion:(void(^)(void))completion; |
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
#import <UIKit/UIKit.h> | |
@interface ARLMarginLabel : UILabel | |
@property (nonatomic, assign) UIEdgeInsets margins; | |
// For IB | |
@property (nonatomic, assign) IBInspectable CGFloat topMargin; | |
@property (nonatomic, assign) IBInspectable CGFloat rightMargin; | |
@property (nonatomic, assign) IBInspectable CGFloat bottomMargin; |
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
#!/bin/bash | |
PROFILE_NAME='iOSTeam Provisioning Profile: Andrew Slabko' | |
ARRAY=() | |
DIR="/Users/slabko/Library/MobileDevice/Provisioning Profiles" | |
for f in "$DIR"/*.mobileprovision | |
do | |
NAME=`security cms -D -i "$f" > tmp.plist && /usr/libexec/PlistBuddy -c 'Print :Name' tmp.plist` | |
if [ "$NAME" = "$PROFILE_NAME" ]; then | |
echo "$f created `security cms -D -i "$f" > tmp.plist && /usr/libexec/PlistBuddy -c 'Print :CreationDate' tmp.plist`" | |
ARRAY+=("$f") |
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
platform :ios, '6.0' | |
pod 'ALibrary' | |
post_install do |installer_representation| | |
installer_representation.project.targets.each do |target| | |
if target.name == 'Pods-ALibrary' | |
target.build_configurations.each do |config| | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'VERY_IMPORTANT_MACROS=1' |
NewerOlder