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
/* | |
Copyright (C) 2016 Apple Inc. All Rights Reserved. | |
See LICENSE.txt for this sampleβs licensing information | |
Abstract: | |
A struct for accessing generic password keychain items. | |
*/ | |
import Foundation |
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 [ "$USER" != "xcodeserver" ]; then | |
if which swiftlint >/dev/null; then | |
swiftlint | |
else | |
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" | |
fi | |
fi |
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
public extension Timer { | |
@discardableResult | |
public class func scheduledTimer(withTimeInterval interval: TimeInterval, block: @escaping (Timer) -> Void) -> Timer { | |
let fireDate = interval + CFAbsoluteTimeGetCurrent() | |
let timer = CFRunLoopTimerCreateWithHandler(kCFAllocatorDefault, fireDate, 0, 0, 0) { (runLoopTimer) in | |
block(runLoopTimer!) | |
}! | |
CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer, CFRunLoopMode.commonModes) |
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
# Customise this file, documentation can be found here: | |
# https://github.com/fastlane/fastlane/tree/master/docs | |
# All available actions: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md | |
# can also be listed using the `fastlane actions` command | |
# Change the syntax highlighting to Ruby | |
# All lines starting with a # are ignored when running `fastlane` | |
# By default, fastlane will send which actions are used | |
# No personal data is shared, more information on https://github.com/fastlane/enhancer |
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
# Mac OS X | |
.DS_Store | |
# Xcode | |
## Build generated | |
build/ | |
DerivedData | |
## Various settings |
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
disabled_rules: # rule identifiers to exclude from running | |
- line_length | |
- force_cast | |
- trailing_whitespace | |
- todo | |
excluded: # paths to ignore during linting. Takes precedence over `included`. | |
- Carthage | |
- Pods | |
- fastlane |
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
/// | |
/// Extention functions for UICollectionViewController | |
/// | |
extension UICollectionViewController { | |
/// Allows easy access to a collection view controller's refrsh control the same way as in a table view controller. | |
var refreshControl: UIRefreshControl? { | |
get { | |
return collectionView?.viewWithTag(140412014669856) as? UIRefreshControl | |
} | |
set { |