Created
October 8, 2014 14:59
-
-
Save dataxpress/a61f3feedb96ae6178cf to your computer and use it in GitHub Desktop.
type of param but no name
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
// Playground - noun: a place where people can play | |
import Foundation | |
func myFunc(String){ | |
// no way to access the value of the string passed in | |
} | |
// myFunc() // error | |
myFunc("Potato!") // works | |
/* I suppose it's useful for this situation: */ | |
class MyClass{ | |
init (){ | |
NSNotificationCenter.defaultCenter().addObserver(self, selector: "someNotification:", name: "SomeNotificationName", object: nil) | |
} | |
func someNotification(NSNotification) | |
{ | |
// this func is required to take an NSNotification but we explicitly don't care about the object being passed in | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment