I want to call a function within another class . But they do not return dictionary in swift. How to solve this?
In my ViewController
var dict = NSDictionary()
dict = temp.GetStation(myUrl)
In my class
func GetStation(url : String) -> NSDictionary {
let dicts = NSDictionary()
getResonse(url, completionhandler: { (dict) -> NSDictionary in
// print(dict)
return dict
})
return dicts;
}