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
#import "Collections.h" | |
@implementation Collections | |
//sorts the array in ascending order | |
-(NSArray *)sortArrayAsc:(NSArray *)array | |
{ | |
return [array sortedArrayUsingSelector:@selector(compare:)]; | |
} |
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
- (instancetype)init | |
{ | |
self = [super init]; | |
self.cards = [[NSMutableArray alloc] init]; | |
NSArray *suits = @[@"♣",@"♥",@"♦",@"♠"]; | |
for (NSInteger i=0; i<4; i++){ | |
for (NSInteger j=0; j<13; j++){ |
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
- (NSArray *)getValuesBetweenNumber:(NSNumber *)startNumber andNumber:(NSNumber *)endNumber | |
{ | |
for (NSInteger i = [startNumber integerValue]; i <= [endNumber integerValue]; i++) | |
{ | |
[self.fizzBuzzArray addObject:@(i)]; | |
} | |
NSString *fizz = @"Fizz "; | |
NSString *buzz = @"Buzz "; | |
NSString *fizzBuzz = @"FizzBuzz "; |
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
#import "Specta.h" | |
#define EXP_SHORTHAND | |
#import "Expecta.h" | |
#import "KIF.h" | |
#import "Swizzlean.h" | |
SpecBegin(GenericTestSpec) | |
describe(@"GenericTestSpec", ^{ |
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
#import "THCameraViewController.h" | |
#import "THCameraButton.h" | |
#define DegreesToRadians(x) ((x) * M_PI / 180.0) | |
@interface THCameraViewController () | |
@property (strong, nonatomic) UIView *videoPreview; | |
//@property (nonatomic) CGFloat videoPreviewWidth; |
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
#import <UIKit/UIKit.h> | |
#import <AVFoundation/AVFoundation.h> | |
#import "THCameraButton.h" | |
@protocol THCameraDelegateProtocol <NSObject> | |
-(void)takePhotoTapped:(UIImage *)image; | |
@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
#import <Foundation/Foundation.h> | |
@interface THTextOverlay : UIView | |
@property (strong, nonatomic) NSString *imageText; | |
@property (nonatomic) CGFloat textSize; | |
@property (strong, nonatomic) UIFont *font; | |
@property (nonatomic) CGRect viewFrameToDrawIn; | |
@property (nonatomic) NSTextAlignment textAlignment; |
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
#import "THTextOverlay.h" | |
@implementation THTextOverlay | |
-(instancetype)init | |
{ | |
return [self initWithImageText:@"DEFAULT TEXT" | |
Font:[UIFont systemFontOfSize:20] | |
FontSize:20 | |
TextAlignment:NSTextAlignmentLeft |
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
#import "THEditImageViewController.h" | |
@interface THEditImageViewController (Autolayout) | |
- (void)layoutCamera; | |
- (void)layoutToolbarOfStandardHeight; | |
- (void)animateLayoutToolbarOfHeightZeroAtBottomOfScreenWithCompletion:(void (^)(void))completionBlock; | |
- (void)animateLayoutToolbarOfStandardHeightWithCompletion:(void (^)(void))completionBlock; | |
- (void)removeAllTopLevelViewConstraints; | |
- (void)removeSubviewConstraints; |
NewerOlder