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/sh | |
| PROJ=`find . -name '*.xib' -o -name '*.[mh]'` | |
| for png in `find . -name '*.png'` | |
| do | |
| name=`basename $png` | |
| if ! grep -q $name $PROJ; then | |
| echo "$png is not referenced" | |
| fi | |
| done |
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 <Availability.h> | |
| #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_4_3 | |
| #warning "This library uses ARC which is only available in iOS SDK 4.3 and later." | |
| #endif | |
| #if !defined dct_weak && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 | |
| #define dct_weak weak | |
| #define __dct_weak __weak | |
| #define dct_nil(x) |
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
| #ifndef _DCT_WEAK_H | |
| #define _DCT_WEAK_H | |
| // Macros for portable support of notionally weak properties with ARC | |
| // Forked from https://gist.github.com/1354106 | |
| // Updated by Rowan James | |
| // Available at https://gist.github.com/1530868 | |
| // Defines: | |
| // dct_weak to be used as a replacement for the 'weak' keyword: | |
| // @property (dct_weak) NSObject* propertyName; |
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
| #ifndef _DCT_WEAK_H | |
| #define _DCT_WEAK_H | |
| // Macros for portable support of notionally weak properties with ARC | |
| // Contributors: Daniel Tull, Abizer Nasir, Rowan James | |
| // Current version: https://gist.github.com/1652385 | |
| // Defines: | |
| // dct_weak to be used as a replacement for the 'weak' keyword: | |
| // @property (dct_weak) NSObject* propertyName; | |
| // __dct_weak to be used as a replacement for the '__weak' variable attribute: |
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
| void copyClassMethods(Class existingClass, Class class) { | |
| NSUInteger classMethodsCount; | |
| Method *classMethods = class_copyMethodList(object_getClass(existingClass), &classMethodsCount); | |
| for (int i = 0; i < classMethodsCount; i++) { | |
| Method method = classMethods[i]; | |
| SEL selector = method_getName(method); | |
| IMP implementation = method_getImplementation(method); | |
| const char *types = method_getTypeEncoding(method); | |
| class_addMethod(object_getClass(class), selector, implementation, types); |
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
| // | |
| // NSBundle+DCTBundleWithName.h | |
| // | |
| // Created by Daniel Tull on 11/07/2012. | |
| // Copyright (c) 2012 Daniel Tull. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface NSBundle (DCTBundleWithName) |
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
| - (void)moveDown { | |
| NSIndexPath *indexPath = [_tableViewController.tableView indexPathForSelectedRow]; | |
| UITableViewCell *cell = [_tableViewController.tableView cellForRowAtIndexPath:indexPath]; | |
| UIView *bg = cell.selectedBackgroundView; | |
| cell.selectionStyle = UITableViewCellSelectionStyleNone; | |
| cell.selectedBackgroundView = nil; | |
| indexPath = [NSIndexPath indexPathForRow:indexPath.row+1 inSection:indexPath.section]; | |
| [_tableViewController.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionBottom]; |
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
| /* | |
| ThreadedManagedObjectContext.h | |
| ThreadedManagedObjectContext | |
| Created by Daniel Tull on 25.07.2012. | |
| Copyright (c) 2012 Daniel Tull. All rights reserved. | |
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
| <?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>--project-company</key> | |
| <string>Elegant Chaos</string> | |
| <key>--company-id</key> | |
| <string>com.elegantchaos</string> | |
| <key>--keep-undocumented-objects</key> | |
| <false/> |
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
| @implementation ShakeAnimation { | |
| CGRect originalRect; | |
| NSInteger counter; | |
| } | |
| + (void)shakeView:(UIView *)view { | |
| [[[[self class] alloc] initWithView:view] shake]; | |
| } | |
| - (id)initWithView:(UIView *)view { |