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]];
this method loads json file, , when try use loadobject method, approach
testobjectloader.loadobject(summarymetrics, fromjsonfile:"summarymetrics", withmapping:mappingprovider.summarymetricsmapping())
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
Post a Comment