uitableview - How to refresh table view without any jerk just like Pinterest app in iOS -
i fetching data server using rest service. when data refresh table view. fetching page page in pinterest app has when table view reach @ last row using scroll fetch data next pages. if @ pinterest app smooth , there no jerk (may use scroll instead of table) in app shows jerk when fetched data next pages.
i using ordinary approach data , reload table [mytable reloaddata]
, thats why not adding code in question. kindly suggest me better approach make smooth. in advance.
you try adding new rows table view:
insertrowsatindexpaths:withrowanimation:
e.g.:
nsmutablearray* indexpaths = [nsmutablearray array]; (short = x; < x + n; ++i) [indexpaths addobject:[nsindexpath indexpathforrow:i insection:0]]; [self.tableview insertrowsatindexpaths:indexpaths withrowanimation:uitableviewrowanimationbottom];
as can see, adding new indexpaths table (i assuming 1 section).
this force table view refresh content displaying new rows -- keep in mind datasource delegate must able provide data new rows, otherwise app crash.
Comments
Post a Comment