How to return value from Promise in swift

前端 未结 0 1082
长情又很酷
长情又很酷 2021-02-20 18:37

I have a function like this

    func fetchPokemons() -> [Pokemon] {
    var pokemons : [Pokemon] = []
    service.fetchPokemons().done{ (newPokemons) in
               


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题