He1nr1ch He1nr1ch - 4 months ago 12
Swift Question

List website search results in tableview

How would I get website search results into an array so that I can display it in a tableview? How do I fetch search results from a website in swift?

Answer

You should parse HTML page (if server has not REST API). First, make request to website (you can use this lib). Second, parse your result. Last, add result to your data in controller (or smth else) and make [self.tableView reloadData];