Dynamic UITableView in Swift

Good day fellow coders,

I’m building an app whereby I would like to display the closest shops to the user.

However, this requires the TableView setup to be done after the view has loaded and appeared – hence after the user has granted location permission.

Is this possible to do this? If so where do I define the TableView protocol functions like "cellsForRowAt" and "numberOfRowsInSection" because these parameters are only available once I have 1) got permission for the location and 2) filtered the closest shops?

I hope the question is clear, any help will be greatly appreciated.

Add Comment
1 Answer(s)

when user done with 1) got permission for the location and 2) filtered the closest shops these 2 things just call tableview.reloadData() and your tableview will be refresh & updated with latest data.

Answered on August 31, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.