How to access an Objective-C class method from Swift language

That's a class method not a property.

So you would access it like...

let w = Weibo.weibo()

... I think.

Type would be inferred but you could do it as...

let w:Weibo = Weibo.weibo() as Weibo

I believe, and it would still work.


+ (Weibo*)weibo; is the class method of your class Weibo. You could access it in swift like

let w:Weibo = Weibo.weibo()

But it gives me error when i tried('weibo' is unavailable: use object construction 'Weibo()') may be because of method name and class name are same. When i change the method name error goes

let w:Weibo = Weibo.getWeibo() // works: method name changed