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 GCDManager : NSObject | |
+ (void)performBackgroundTask:(void (^)())block withCompletion:(void (^)())completion; | |
+ (void)performHighPriorityBackgroundTask:(void (^)())block withCompletion:(void (^)())completion; | |
+ (void)performLowPriorityBackgroundTask:(void (^)())block withCompletion:(void (^)())completion; | |
@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
// | |
// YMKeyboardLayoutHelperView.m | |
// ios-chat | |
// | |
// Created by Steven Hepting on 7/17/13. | |
// Copyright (c) 2013 Yammer. All rights reserved. | |
// | |
#import "YMKeyboardLayoutHelperView.h" | |
#import "UIView+LayoutAdditions.h" |
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
//takes an image, and returns a dictionary with multiple sizes | |
-(NSDictionary *)resizeImage:(UIImage *)theImage | |
{ | |
//Create the "large" size image to upload | |
float actualHeight = theImage.size.height; | |
float actualWidth = theImage.size.width; | |
float imgRatio = actualWidth/actualHeight; | |
//set the maximum size you want - width/height | |
float maxRatio = 640.0/960.0; | |
//determine the required size to use |
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> | |
#import <QuartzCore/QuartzCore.h> | |
// generate a UIColor from rgb and alpha values | |
#define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a] | |
#define RGB(r, g, b) RGBA(r, g, b, 1.0) | |
// generate a UIColor | |
#define GRAYSCALEA(rgb, a) RGBA(rgb, rgb, rgb, a) | |
#define GRAYSCALE(rgb) GRAYSCALEA(rgb, 1.0) | |
// generate a UIColor from a hex and an alpha value |
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
/* This SnapshotHelper class should be compatible with SnapshotHelper.swift version 1.2 */ | |
@import Foundation; | |
@import XCTest; | |
@interface SnapshotHelper : NSObject | |
- (instancetype)initWithApp:(XCUIApplication*)app; | |
- (void)snapshot:(NSString*)name waitForLoadingIndicator:(BOOL)wait; |
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> | |
#import "Image.h" | |
@interface ImageHelper : NSObject{ | |
@private | |
Image *image; | |
} | |
- (UIImage *)getThumbnailImage; | |
- (UIImage *)getFullScreenImage; | |
- (UIImage *)getOriginalImage; |
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 "ImageHelper.h" | |
#import "EntryHelper.h" | |
@implementation ImageHelper | |
@synthesize image; | |
- (UIImage *)getFullScreenImage{ | |
return [UIImage imageWithContentsOfFile:[self getFullScreenImagePath]]; | |
} |
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
@interface AppDelegate() <GGLInstanceIDDelegate, GCMReceiverDelegate> | |
@property(nonatomic, strong) NSString *gcmSenderID; | |
@property(nonatomic, strong) NSDictionary *registrationOptions; | |
@end | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>GCM_SENDER_ID</key> | |
<string>***************</string> | |
<key>PLIST_VERSION</key> | |
<string>1</string> | |
<key>BUNDLE_ID</key> | |
<string>com.example.testapp</string> |