Swift and why initialize a function and then call a method?

后端 未结 0 953
走了就别回头了
走了就别回头了 2020-11-30 08:30

In swift I saw someone call a function like this

Api().getPost { (posts) in
        self.posts = posts
    }

This is what the Api class looks

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