Skip to content

Instantly share code, notes, and snippets.

@schneiderandre
schneiderandre / ProtocolType.swift
Created Aug 20, 2014
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.
View ProtocolType.swift
import UIKit
protocol RESTServiceType {
class func getData()
}
struct RESTService: RESTServiceType {
static func getData() {
println("Data")
}
@schneiderandre
schneiderandre / protocols.swift
Created Jul 11, 2014
Once you use ServiceProtocol as an input parameter in the ServiceProtocolDelegate method, Xcode crashes at compile time.
View protocols.swift
import Cocoa
protocol ServiceProtocolDelegate {
func service(service: ServiceProtocol, didLoadItems items: [String])
}
protocol ServiceProtocol {
func getData()
var delegate: ServiceProtocolDelegate {get set}
}
View keybase.md

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 / .gitignore
Last active Aug 29, 2015
Objective-C gitignore file.
View .gitignore
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
@schneiderandre
schneiderandre / StyleSettings.plist
Created Feb 1, 2014
The currently used Objective-Clean style settings.
View StyleSettings.plist
<?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/>