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
| static BOOL isRunningTests(void) { | |
| NSDictionary *environment = [[NSProcessInfo processInfo] environment]; | |
| NSString *injectBundle = environment[@"XCInjectBundle"]; | |
| return [[injectBundle pathExtension] isEqualToString:@"octest"]; | |
| } |
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
| find . -name "*.m" -exec wc -l "{}" \; | sort -n |
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
| // | |
| // UIView+GetColor.swift | |
| // SwiftPick | |
| // | |
| // Created by Maciej Banasiewicz, Michał Apanowicz on 06/07/14. | |
| // | |
| // | |
| import UIKit |
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 <Foundation/Foundation.h> | |
| @interface NSString (URLHelper) | |
| - (NSURL *)urlFromString; | |
| @end |
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
| // This goes in some global header, let it be *.pch | |
| #define SuppressPerformSelectorLeakWarning(Stuff) \ | |
| do { \ | |
| _Pragma("clang diagnostic push") \ | |
| _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \ | |
| Stuff; \ | |
| _Pragma("clang diagnostic pop") \ | |
| } while (0) | |
| // And then in any method you just call this function |
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
| // | |
| // NSObject+LogProperties.h | |
| // | |
| // Gist created by Maciej Banasiewicz. | |
| // Log all properties of an object. | |
| // Credits: Tieme | |
| // Source: http://stackoverflow.com/questions/13922581/is-there-a-way-to-log-all-the-property-values-of-an-objective-c-instance | |
| #import <Foundation/Foundation.h> |
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
| // | |
| // UITableView+HLTEnumarateCells.h | |
| // | |
| // Created by Maciej Banasiewicz. | |
| // | |
| #import <UIKit/UIKit.h> | |
| @interface UITableView (HLTEnumarateCells) | |
| - (void)enumarateTableViewCellsUsingBlock:(void(^)(UITableViewCell *))blk; |
NewerOlder