ios - How to write this Objective-C Code into Swift -


i have method in objective-c i'm trying call in swift.

    [testobjectloader loadobject:summarymetrics fromjsonfile:@"summarymetrics" withmapping:[mappingprovider summarymetricsmapping]]; 

enter image description here

this method loads json file, , when try use loadobject method, approach

testobjectloader.loadobject(summarymetrics, fromjsonfile:"summarymetrics", withmapping:mappingprovider.summarymetricsmapping()) enter image description here

but auto-complete not come up. have bridging file working, i'm not sure i'm doing wrong..

error message: testobjectloader.type not have member named loadobject

any appreciated.

in general, equivalent swift syntax be:

testobjectloader.loadobject(summarymetrics, fromjsonfile:"summarymetrics", withmapping:mappingprovider.summarymetricsmapping()) 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

asp.net core mvc - How important is the global.json and src folder? -

c++ - Using Gtest how return different values in ON_CALL? -