【发布时间】:2015-10-26 06:54:50
【问题描述】:
我在 Swift 中有一个静态方法
class BaseAsyncTask: WebServiceClient {
class func execute(content : [String:AnyObject], cancelled:CustomBool)
{
// Print class name (BaseAsyncTask) here
}
}
我想知道如何在该方法中获取类名。我试过了
self.dynamicType
但这会产生错误(我想是因为类函数中的 self)
【问题讨论】:
标签: ios swift function class static