What am I doing wrong in Swift for calling this Objective-C block/API call?

后端 未结 3 1226
后悔当初
后悔当初 2021-01-20 01:40

I\'m using RedditKit to integrate Reddit into an app, and in Objective-C I called the API as follows (and it worked fine):

    [[RKClient sharedClient] signI         


        
3条回答
  •  無奈伤痛
    2021-01-20 02:03

    For completeness here's some code that works:

        RKClient.sharedClient().frontPageLinksWithPagination(nil, completion: {
            (collection, pagination, error) in
            if let links = collection as? RKLink[] {
                for link in links {
                    println(link.title)
                }
            }
        })
    

提交回复
热议问题