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 | |
/// Wrapper for the NSNotification userInfo values associated with a keyboard notification. | |
/// | |
/// It provides properties that retrieve userInfo dictionary values with these keys: | |
/// | |
/// - UIKeyboardFrameBeginUserInfoKey | |
/// - UIKeyboardFrameEndUserInfoKey | |
/// - UIKeyboardAnimationDurationUserInfoKey | |
/// - UIKeyboardAnimationCurveUserInfoKey |
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
/// like XCTAssertEqual, but handles optional unwrapping | |
public func XCTAssertEqualOptional<T: Any where T: Equatable>(expression1: @auto_closure () -> T?, expression2: @auto_closure () -> T?, _ message: String? = nil, file: String = __FILE__, line: UInt = __LINE__) { | |
if let exp1 = expression1() { | |
if let exp2 = expression2() { | |
XCTAssertEqual(exp1, exp2, message ? message! : "", file: file, line: line) | |
} else { | |
XCTFail(message ? message! : "exp1 != nil, exp2 == nil", file: file, line: line) | |
} | |
} else if let exp2 = expression2() { | |
XCTFail(message ? message! : "exp1 == nil, exp2 != nil", file: file, line: line) |
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
@interface SomeViewController () | |
// Declare some collection properties to hold the various updates we might get from the NSFetchedResultsControllerDelegate | |
@property (nonatomic, strong) NSMutableIndexSet *deletedSectionIndexes; | |
@property (nonatomic, strong) NSMutableIndexSet *insertedSectionIndexes; | |
@property (nonatomic, strong) NSMutableArray *deletedRowIndexPaths; | |
@property (nonatomic, strong) NSMutableArray *insertedRowIndexPaths; | |
@property (nonatomic, strong) NSMutableArray *updatedRowIndexPaths; | |
@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
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
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
# 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) |