Skip to content

Commit

Permalink
NSInvocation+Block
Browse files Browse the repository at this point in the history
NSObject+EasyCopy
NSURLConnection+SelfSigned
UIButton+MiddleAligning
UIScrollView+EmptyDataSet
UIView+CustomBorder
  • Loading branch information
Jakey committed Dec 22, 2015
1 parent f2e4627 commit d2e6e2b
Show file tree
Hide file tree
Showing 54 changed files with 3,381 additions and 184 deletions.
7 changes: 7 additions & 0 deletions Categories/Foundation/NSData/NSData+Base64.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ + (NSData *)dataWithBase64EncodedString:(NSString *)string
#if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_9 || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
if (![NSData instancesRespondToSelector:@selector(initWithBase64EncodedString:options:)])
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
decoded = [[self alloc] initWithBase64Encoding:[string stringByReplacingOccurrencesOfString:@"[^A-Za-z0-9+/=]" withString:@"" options:NSRegularExpressionSearch range:NSMakeRange(0, [string length])]];
#pragma clang diagnostic pop
}
else
#endif
Expand All @@ -48,7 +51,11 @@ - (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth
#if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_9 || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
if (![NSData instancesRespondToSelector:@selector(base64EncodedStringWithOptions:)])
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
encoded = [self base64Encoding];
#pragma clang diagnostic pop

}
else
#endif
Expand Down
2 changes: 1 addition & 1 deletion Categories/Foundation/NSDate/NSDate+CupertinoYankee.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ - (NSDate *)endOfWeek {
NSCalendar *calendar = [NSCalendar currentCalendar];

NSDateComponents *components = [[NSDateComponents alloc] init];
[components setWeek:1];
[components setWeekOfMonth:1];

return [[calendar dateByAddingComponents:components toDate:[self beginningOfWeek] options:0] dateByAddingTimeInterval:-1];}

Expand Down
25 changes: 25 additions & 0 deletions Categories/Foundation/NSInvocation/NSInvocation+Bb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// NSInvocation+Bb.h
// Bb_revised
//
// Created by Travis Henspeter on 1/21/15.
// Copyright (c) 2015 birdSound. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSInvocation (Bb)


+ (id)doInstanceMethodTarget:(id)target
selectorName:(NSString *)selectorName
args:(NSArray *)args;

+ (id)doClassMethod:(NSString *)className
selectorName:(NSString *)selectorName
args:(NSArray *)args;

- (void)setArgumentWithObject:(id)object atIndex:(NSUInteger)index;


@end
Loading

0 comments on commit d2e6e2b

Please sign in to comment.