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
+ (UIImage *)installButtonBackground:(BOOL)fill | |
{ | |
CGFloat borderWidth = 1.0; | |
CGFloat cornerRadius = 3.0; | |
CGSize size = CGSizeMake((cornerRadius * 2) + 1.0, (cornerRadius * 2) + 1.0); | |
UIColor *buttonColor = [UIColor installButtonColor]; | |
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0); | |
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake((borderWidth / 2), (borderWidth / 2), size.width - borderWidth, size.height - borderWidth) byRoundingCorners:UIRectCornerAllCorners cornerRadii:CGSizeMake(cornerRadius, cornerRadius)]; |
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
Incident Identifier: 2986E199-B268-464A-883E-362B59A00AD0 | |
CrashReporter Key: c68af6ee22388954851f65669288c7fb6e1c03dc | |
Hardware Model: iPad4,1 | |
OS Version: iPhone OS 7.1.2 (11D257) | |
Kernel Version: Darwin Kernel Version 14.0.0: Thu May 15 23:17:54 PDT 2014; root:xnu-2423.10.71~1/RELEASE_ARM64_S5L8960X | |
Date: 2014-10-21 09:58:46 +0100 | |
Time since snapshot: 218 ms | |
Free pages: 1951 | |
Active pages: 133010 |
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
#pragma mark - Keyboard Appearance | |
- (void)keyboardWillShow:(NSNotification *)notification | |
{ | |
NSDictionary* info = [notification userInfo]; | |
CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
keyboardFrame = [self.view.window convertRect:keyboardFrame toView:self.view]; | |
CGRect intersectRect = CGRectIntersection(self.view.frame, keyboardFrame); | |
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 *dir = @"/Users/liam.nichols/Desktop/layers/"; | |
-(void)sublayersToFile | |
{ | |
for (UIWindow *window in [[UIApplication sharedApplication] windows]) | |
{ | |
if ([window isKindOfClass:NSClassFromString(@"UITextEffectsWindow")]) | |
{ | |
[self subviewsInView:window]; | |
break; |
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
#pragma mark - UIImage Representations | |
- (UIImage *)imageRepresentation | |
{ | |
CGFloat scale = [[UIScreen mainScreen] scale]; | |
CGRect rect = CGRectMake(0, 0, scale, scale); | |
CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB(); | |
CGContextRef context = CGBitmapContextCreate(NULL, CGRectGetWidth(rect), CGRectGetHeight(rect), 8, 0, rgbColorSpace, kCGImageAlphaPremultipliedFirst); |
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
// | |
// Created by Liam Nichols on 06/08/2013. | |
// Copyright (c) 2013 Liam Nichols. All rights reserved. | |
// | |
// To change the template use AppCode | Preferences | File Templates. | |
// | |
#import "LNCollectionViewPagedLayout.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
//Pull all the policy option hash's into memory | |
NSManagedObjectContext *managedObjectContext = [[SalesManager sharedSalesManager] managedObjectContext]; | |
NSExpressionDescription* objectIdDesc = [NSExpressionDescription new]; | |
objectIdDesc.name = @"objectID"; | |
objectIdDesc.expression = [NSExpression expressionForEvaluatedObject]; | |
objectIdDesc.expressionResultType = NSObjectIDAttributeType; | |
NSFetchRequest *search = [NSFetchRequest fetchRequestWithEntityName:[ExtraPrice entityName]]; | |
search.resultType = NSDictionaryResultType; | |
search.returnsDistinctResults = YES; |
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
// System Device Type (iPhone1,0) (Formatted = iPhone 1) | |
+ (NSString *)systemDeviceTypeFormatted:(BOOL)formatted { | |
// Set up a Device Type String | |
NSString *DeviceType; | |
// Check if it should be formatted | |
if (formatted) { | |
// Formatted | |
@try { | |
// Set up a new Device Type String |
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
// System Device Type (iPhone1,0) (Formatted = iPhone 1) | |
+ (NSString *)systemDeviceTypeFormatted:(BOOL)formatted { | |
// Set up a Device Type String | |
NSString *DeviceType; | |
// Check if it should be formatted | |
if (formatted) { | |
// Formatted | |
@try { | |
// Set up a new Device Type String |
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
- (void)applicationDidEnterBackground:(UIApplication *)application | |
{ | |
self.window.layer.rasterizationScale = 0.1f; | |
self.window.layer.shouldRasterize = YES; | |
} | |
- (void)applicationWillEnterForeground:(UIApplication *)application | |
{ | |
self.window.layer.rasterizationScale = 1.0f; | |
self.window.layer.shouldRasterize = NO; |
OlderNewer