1
我是swift的新手。我想在靜態函數中使用無靜態成員的Swift類以下是我的代碼。我無法在靜態函數中訪問靜態類的成員。有沒有辦法在swift函數中訪問非靜態成員?在swift類的靜態函數中訪問非靜態常量
public class Test{
private let testString:String
init(test:String){
testString = test
}
static func Get(url:String){
//Here testString is not accessable..
}
}