ios - Loading data from webservice in UitableView -


i have tableview custom cell. want populate tableview data coming form webservice. saving data in nsuserdefaults after getting webservice. , fetching userdefaults array named "dataarray"

now when try populate in cellforrowatindexpath show error because dataarray not populated yet. lets if take 2 seconds fetch data webservice, save in userdefaults , populate array. how can populate tableview after 2 seconds , not before ?

please thanks.

1- create array , in numberofrowsinsection

return array.count; 

2-after data web service populate array , used tableview.reloaddata()

3- check used correct tableview , correct cell identifier , establish uitableview delegate , datasource app. hope you.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -