Skip to content

Instantly share code, notes, and snippets.

@schneiderandre
schneiderandre / StyleSettings.plist
Created February 1, 2014 14:34
The currently used Objective-Clean style settings.
<?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>kRequireSpaceAfterColon</key>
<false/>
<key>kRequireOpenBraceOnMethodSignatureLine</key>
<false/>
<key>kRequireOpenBraceOnConditionalStatementLine</key>
<true/>
@schneiderandre
schneiderandre / .gitignore
Last active August 29, 2015 13:56
Objective-C gitignore file.
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3

Keybase proof

I hereby claim:

  • I am schneiderandre on github.
  • I am andreschneider (https://keybase.io/andreschneider) on keybase.
  • I have a public key whose fingerprint is FB61 6F49 120A 42E4 F91B 3B04 02EC 03FC 8333 00DA

To claim this, I am signing this object:

@schneiderandre
schneiderandre / protocols.swift
Created July 11, 2014 14:57
Once you use ServiceProtocol as an input parameter in the ServiceProtocolDelegate method, Xcode crashes at compile time.
import Cocoa
protocol ServiceProtocolDelegate {
func service(service: ServiceProtocol, didLoadItems items: [String])
}
protocol ServiceProtocol {
func getData()
var delegate: ServiceProtocolDelegate {get set}
}
@schneiderandre
schneiderandre / ProtocolType.swift
Created August 20, 2014 16:01
The service variable in ViewController should be able to take every type that conforms to the RESTServiceType Protocol. But this produces a Swift Compiler Error.
import UIKit
protocol RESTServiceType {
class func getData()
}
struct RESTService: RESTServiceType {
static func getData() {
println("Data")
}