<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--View Controller-->
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 Networking | |
import DATAStack | |
import Sync | |
import JSON | |
class NetworkingClient { | |
var data: DATAStack! | |
var networking: Networking! |
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
Xcode: | |
Show Toolbar: Shift + Command + T | |
Hide Toolbar: Shift + Command + T | |
Sketch: | |
Show Toolbar: Shift + Command + T | |
Hide Toolbar: Shift + Command + T | |
Show Inspector: Alt(Option) + Command + 0 | |
Show Layers List: Command + 0 |
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 UIKit | |
import XCPlayground | |
class View: UIView { | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
self.frame = 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
import UIKit | |
import XCPlayground | |
func table() -> UITableView { | |
let frame = CGRect(x: 0, y: 0, width: 320.0, height: 320.0) | |
let tableView = UITableView(frame: frame) | |
tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell") | |
return tableView | |
} |
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 UIKit | |
import XCPlayground | |
class Cell: UITableViewCell { | |
init(frame: CGRect) { | |
super.init(style: .Default, reuseIdentifier: "Sample") | |
self.frame = frame | |
self.backgroundColor = .redColor() |
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" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES"> | |
<dependencies> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/> | |
</dependencies> | |
<objects> | |
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | |
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | |
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="100" id="KGk-i7-Jjw" customClass="CHRLocationEventCell"> | |
<rect key="frame" x="0.0" y="0.0" width="320" height="100"/> |
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
// | |
// Warnings.xcconfig | |
// | |
// The list of warnings we (don’t) use, and the reasons why. | |
// | |
// :MARK: Warnings in use: | |
// :MARK: -everything | |
// We want the best possible diagnostics, so we simply enable everything that exists, and then opt–out of what doesn’t make sense for us. | |
// | |
// :MARK: - Warnings not to be promoted: |
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
// Swift | |
enum StatusCode: Int { | |
case Unknown = 0 | |
case Unauthorized = 401 | |
case Forbidden = 403 | |
case InternalServerError = 500 | |
case ServiceUnavailable = 503 | |
} | |
// Objective-C |
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)generateModel { | |
NSManagedObjectModel *model = [NSManagedObjectModel new]; | |
NSEntityDescription *runEntity = [NSEntityDescription new]; | |
runEntity.name = @"Run"; | |
runEntity.managedObjectClassName = @"Run"; | |
model.entities = @[runEntity]; | |
NSMutableArray *runProperties = [NSMutableArray new]; | |
NSAttributeDescription *dateAttribute = [NSAttributeDescription new]; |