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" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | |
<dependencies> | |
<deployment identifier="iOS"/> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/> | |
</dependencies> | |
<scenes> | |
<!--View Controller--> | |
<scene sceneID="tne-QT-ifu"> | |
<objects> |
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
#if os(iOS) | |
import UIKit | |
typealias NSLayoutPriority = UILayoutPriority | |
#elseif os(OSX) | |
import AppKit | |
#endif | |
public extension NSLayoutAttribute { | |
/** Return a LayoutAnchor representing attribute `self` of `item`. */ |
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
{ | |
"name": "appfont", | |
"css_prefix_text": "icon-", | |
"css_use_suffix": false, | |
"hinting": true, | |
"units_per_em": 1000, | |
"ascent": 850, | |
"glyphs": [ | |
{ | |
"uid": "324e9013e79ecf9e0e30a07feffa9d6b", |
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 XCPlayground | |
import Foundation | |
import UIKit | |
func maskCorners(corners: [UIViewContentMode], ofView view: UIView, toDepth depth: CGFloat) { | |
let s = 1 + 2 * depth | |
let path = UIBezierPath() | |
if corners.contains(.TopLeft) { | |
path.moveToPoint(CGPoint(x: 0, y: 0 + depth)) |
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> | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
NSMutableArray *myNums = [NSMutableArray array]; | |
NSString *inputs = @"392 392 339 394 393 394 339"; | |
for (NSString *word in [inputs componentsSeparatedByString:@" "]) { | |
NSNumber *n = [NSDecimalNumber decimalNumberWithString:word]; | |
[myNums addObject:n]; |
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)layoutSubviews { | |
[super layoutSubviews]; | |
void objc_msgSend(); | |
NSLog(@"%@", ((id(*)(id,SEL))objc_msgSend)(self, @selector(recursiveDescription))); | |
NSLog(@"hcons: %@", [self constraintsAffectingLayoutForAxis:UILayoutConstraintAxisHorizontal]); | |
NSLog(@"vcons: %@", [self constraintsAffectingLayoutForAxis:UILayoutConstraintAxisVertical]); | |
} |
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" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc"> | |
<dependencies> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/> | |
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | |
</dependencies> | |
<scenes> | |
<!--View Controller--> | |
<scene sceneID="ufC-wZ-h7g"> | |
<objects> |
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" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc"> | |
<dependencies> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | |
</dependencies> | |
<scenes> | |
<!--View Controller--> | |
<scene sceneID="ufC-wZ-h7g"> | |
<objects> | |
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController"> |
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 <UIKit/UIKit.h> | |
@interface UIImage (Rob_PDFPage) | |
/** | |
I return an image in which I have drawn page `pageNumber` of the PDF found at `url`. Pages are numbered starting at 1. If I can't draw the page, I return `nil`. | |
*/ | |
+ (UIImage *)Rob_imageWithPDFURL:(NSURL *)url pageNumber:(size_t)pageNumber; | |
@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
/** | |
Use this as the custom class of a container view in a storyboard if you want the container view to honor its embedded view's intrinsic content size. | |
*/ | |
@interface RobIntrinsicContentSizeHonoringContainerView : UIView | |
/** Connect this to my width constraint in the storyboard if you want me to use my subview's intrinsic content width. */ | |
@property (nonatomic, strong) IBOutlet NSLayoutConstraint *widthConstraint; | |
/** Connect this to my height constraint in the storyboard if you want me to use my subview's intrinsic content height. */ | |
@property (nonatomic, strong) IBOutlet NSLayoutConstraint *heightConstraint; |