I know that you cannot access a non static class variable from within a static context, but what about the other way around? I have the following code:
class MyClass {
static var myArr = [String]()
func getArr() -> [String] {
return myArr
}
However, when I try to compile this, I get the error MyClass does not have a member named myArr. I thought static variables were visible to both static and non static methods, so I don't know where I am going wrong.
I am on a Macbook running OS X Yosemite using Xcode 6.3.