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
// | |
// UIViewController+Rx.swift | |
// | |
// Created by Martin McBrearty on 29/04/2016. | |
// | |
import Foundation | |
import RxSwift | |
extension UIViewController { |
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 | |
import UIKit | |
extension UILabel { | |
func resizeFontToFitHeight() { | |
guard let text = text else { return } | |
let labelHeight = CGRectGetHeight(frame) |
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
class SwiftAttributedString: NSObject { | |
private var attributedString = NSMutableAttributedString() | |
private var attributes = [String: AnyObject]() | |
private var currentString = "" | |
private var currentRange = NSRange() | |
private var paragraphStyle = NSMutableParagraphStyle() | |
init(string str: String) { | |
super.init() |
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
// | |
// GCD+Utils.swift | |
// - | |
// | |
// | |
// Use: | |
// ASyncMain() { | |
// your code executed on main thread | |
// } | |
// |
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
- (void) loadJSON:(NSURL*)url | |
{ | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
NSData* data = [NSData dataWithContentsOfURL:url]; | |
[self performSelectorOnMainThread:@selector(fetchedData:) | |
withObject:data | |
waitUntilDone:YES]; | |
}); |
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
RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); | |
RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); |
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
// | |
// NSString+Utils.m | |
// Invenias | |
// | |
// Created by Martin McBrearty on 15/01/2013. | |
// Copyright (c) 2013 Myello Digital Ltd. All rights reserved. | |
// | |
#import "NSString+Utils.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
ROOT_DIR = [YOUR_DIRECTORY_TFS_PROJECT_SITS_IN] | |
TFS_PROJECT = [YOUR_TFS_PROJECT_NAME] | |
TFS_LOCAL_DIR = ${ROOT_DIR}/${TFS_PROJECT} | |
XCODE_PROJECT_DIR = ${TFS_LOCAL_DIR}/Xcode/[XCODE_PROJECT_NAME] | |
TFS_SERVER = [YOUR_TFS_SERVER_LOCATION]/DefaultCollection | |
TFS_COLLECTION = $$/${TFS_PROJECT} | |
# Step1: Create the project root directory | |
init: | |
@read -p "Create Directory: ${ROOT_DIR} (y/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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Cancellation</key> | |
<dict> | |
<key>Cancel</key> | |
<string>cancelOperation:</string> | |
</dict> | |
<key>Case Changes</key> |