VKSDK : How to translate code to swift?

118 views Asked by At

I try to translate this code:

[[VKSdk instance] setUiDelegate:self];

i tried so:

VKSdk.instance().setUiDelegate(self)

But this is wrong! Please help!

1

There are 1 answers

2
Dennis Weidmann On BEST ANSWER

From where do you have the Objective-C code above? I have quickly read over the frameworks.h file and did not find something like that.

But I did find this:

VKSdk.initializeWithDelegate(self, andAppId: "")

Is that what you are searching for? Or does it have to be the setUIDelegate?

UPDATE

Wait I have found something else...

VKSdkUIDelegate Protocol.

Please try this:

VKSdk.instance().uiDelegate = self

VK iOS SDK