How to call Type Methods within an instance method

var staticRet:String = ClassA.staticMethod()

This works. It doesn’t take any parameters so you don’t need to pass in any. You can also get ClassA dynamically like this:

Swift 2

var staticRet:String = self.dynamicType.staticMethod()

Swift 3

var staticRet:String = type(of:self).staticMethod()

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)