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
// | |
// BaseTableView.m | |
// | |
// Created by pronebird on 1/12/16. | |
// Copyright © 2016 pronebird. All rights reserved. | |
// | |
@interface BaseTableView () | |
@property (nonatomic) BOOL isCallingFromScrollToRowAtIndexPath; |
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
// | |
// BasePresentationController.h | |
// | |
// Created by pronebird on 4/27/16. | |
// Copyright © 2016 Andrey Mikhaylov. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface BasePresentationController : UIPresentationController |
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 | |
let sharedQueue = OperationQueue() | |
class TestOperation : Operation | |
{ | |
override func execute() { | |
dispatch_async(dispatch_get_main_queue()) { | |
// print("Finished.") |
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
// | |
// MagicalRecord + Seam bridge | |
// | |
#import "MagicalRecord+SeamStore.h" | |
@import Seam; | |
@implementation NSPersistentStoreCoordinator (SeamStore) |
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
//: Playground - noun: a place where people can play | |
/* | |
This playground prints CSV with all font sizes for each content size category and text style. | |
*/ | |
import UIKit | |
import XCPlayground | |
/* |
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
//: Playground - noun: a place where people can play | |
import Foundation | |
//: We have to define init() method for ObjectType() to work | |
protocol Creatable { | |
init() | |
} |
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)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url { | |
UIImage *receipt = [UIImage imageWithContentsOfFile:url.path]; | |
// BUG: http://www.openradar.me/20447945 | |
// Skip one run loop to hook up transition coordinator and run action when picker dismissed | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
// iOS < 8.3 | |
if(controller.transitionCoordinator) { | |
[controller.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="https://raw.githubusercontent.com/konvajs/konva/master/konva.min.js"></script> | |
</head> | |
<body> | |
<div id="konva"></div> | |
<script id="jsbin-javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="https://raw.githubusercontent.com/konvajs/konva/master/konva.min.js"></script> | |
</head> | |
<body> | |
<label><input type="checkbox" value="yes" id="disableHitFromCache" /> Disable drawHitFromCache</label> | |
<div id="konva" style="width: 300px; height: 300px;"></div> |
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
// | |
// main.m | |
// | |
#import <UIKit/UIKit.h> | |
#import <pop/POP.h> | |
#import "AppDelegate.h" | |
static CGFloat deceleration_for_distance(CGFloat distance, CGFloat velocity) | |
{ |