Simple visual illustrations of how CGRectDivideWithPadding works.
+-------+---------+------------>
e | | |
d | slice | padding | remainder…
g | | |
e | | |
| source ~/.bash_profile | |
| cd ${SRCROOT} | |
| /path/to/xctool.sh -reporter json-compilation-database:compile_commands.json clean | |
| /path/to/xctool.sh -reporter json-compilation-database:compile_commands.json build | |
| oclint-json-compilation-database | sed 's/\(.*\.\m\{1,2\}:[0-9]*:[0-9]*:\)/\1 warning:/' |
| // Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
| // Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
| // Licensed under MIT (http://opensource.org/licenses/MIT) | |
| // | |
| // You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
| // PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> |
Simple visual illustrations of how CGRectDivideWithPadding works.
+-------+---------+------------>
e | | |
d | slice | padding | remainder…
g | | |
e | | |
| /* ----------------------------------------------------------------------- */ | |
| /* */ | |
| /* Improved upon a mixin from 37signals and combined */ | |
| /* with these numbers from marc. */ | |
| /* */ | |
| /* 37signals-version: */ | |
| /* http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss */ | |
| /* */ | |
| /* @kimroen */ | |
| /* */ |
| // | |
| // OLD AND BUSTED | |
| // | |
| if ([self.zoomingDelegate respondsToSelector:@selector(zoomingWindow:didZoomOutViewController:)] == YES) | |
| { | |
| // Do something important. | |
| } | |
| // |
| // | |
| // SOInsetLabel.h | |
| // | |
| // Created by Joseph Hankin on 11/2/12. | |
| // From code posted by Rob Mayoff. | |
| // http://stackoverflow.com/questions/8467141/ios-how-to-achieve-emboss-effect-for-the-text-on-uilabel | |
| // Copyright (c) 2012 Joseph Hankin. All rights reserved. | |
| // |
| // Smart little helper to find main thread hangs. Enable in appDidFinishLaunching. | |
| // Only available with source code in DEBUG mode. | |
| @interface PSPDFHangDetector : NSObject | |
| + (void)startHangDetector; | |
| @end | |
| @implementation PSPDFHangDetector | |
| + (void)startHangDetector { | |
| #ifdef DEBUG |
| { | |
| "bold_folder_labels": true, | |
| "color_scheme": "Packages/User/Espresso Soda.tmTheme", | |
| "ensure_newline_at_eof_on_save": true, | |
| "file_exclude_patterns": | |
| [ | |
| ".DS_Store", | |
| ".gitkeep", | |
| "dump.rdb" | |
| ], |
| #import <UIKit/UIKit.h> | |
| @interface UIView (SMFrameAdditions) | |
| @property (nonatomic, assign) CGPoint $origin; | |
| @property (nonatomic, assign) CGSize $size; | |
| @property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties | |
| @property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect | |
| @end |
| # xcode-build-bump.sh | |
| # @desc Auto-increment the build number every time the project is run. | |
| # @usage | |
| # 1. Select: your Target in Xcode | |
| # 2. Select: Build Phases Tab | |
| # 3. Select: Add Build Phase -> Add Run Script | |
| # 4. Paste code below in to new "Run Script" section | |
| # 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
| # 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |