https://github.com/ReactiveCocoa/ReactiveCocoa
https://github.com/Alamofire/Alamofire
https://github.com/antitypical/Result
| - (void)viewWillAppear:(BOOL)animated | |
| { | |
| [super viewWillAppear:animated]; | |
| NSIndexPath *selectedRowIndexPath = [self.tableView indexPathForSelectedRow]; | |
| if (selectedRowIndexPath) { | |
| [self.tableView deselectRowAtIndexPath:selectedRowIndexPath animated:YES]; | |
| [[self transitionCoordinator] notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
| if ([context isCancelled]) { | |
| [self.tableView selectRowAtIndexPath:selectedRowIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; |
| #!/bin/sh | |
| # Create a RAM disk with same perms as mountpoint | |
| # Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
| # Usage: sudo ./xcode_ramdisk.sh start | |
| USERNAME=$(logname) | |
| TMP_DIR="/private/tmp" | |
| RUN_DIR="/var/run" |
| see https://github.com/nst/HTTPRequests |
| import UIKit | |
| /// A validation rule for text input. | |
| public enum TextValidationRule { | |
| /// Any input is valid, including an empty string. | |
| case noRestriction | |
| /// The input must not be empty. | |
| case nonEmpty | |
| /// The enitre input must match a regular expression. A matching substring is not enough. | |
| case regularExpression(NSRegularExpression) |
| /// Withable is a simple protocol to make constructing | |
| /// and modifying objects with multiple properties | |
| /// more pleasant (functional, chainable, point-free) | |
| public protocol Withable { | |
| init() | |
| } | |
| public extension Withable { | |
| /// Construct a new instance, setting an arbitrary subset of properties | |
| init(with config: (inout Self) -> Void) { |