ios - Declaring function usable throughout project -
i new swift , trying figure out how add function usable throughout entire project. simple function like
func globalfunction() { println("global function!") }
then able call function on swift file within project. declare function?
its in programming language - declaring function outside class, like:
class { var a:int // can call global function here } class b { var b:int // , here } func flobalfunction() { println("hello, global function!") }
Comments
Post a Comment