mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add support automatically adjusting the content offset to UITableView as well as support for performing endUpdates with no animations. Additionally, there are critical bug fixes for ASDataController (begin/end updates delegates not called in correct order) and ASRangeController (failure to fully refresh internal state when inserts or delete are made.)
This commit is contained in:
@@ -93,15 +93,40 @@
|
||||
*/
|
||||
- (void)reloadData;
|
||||
|
||||
|
||||
/**
|
||||
* We don't support the these methods for animation yet.
|
||||
*
|
||||
* TODO: support animations.
|
||||
* begins a batch of insert, delete reload and move operations. Batches are asynchronous an thread safe.
|
||||
*/
|
||||
- (void)beginUpdates;
|
||||
|
||||
/**
|
||||
* Concludes a series of method calls that insert, delete, select, or reload rows and sections of the table view.
|
||||
* You call this method to bracket a series of method calls that begins with beginUpdates and that consists of operations
|
||||
* to insert, delete, select, and reload rows and sections of the table view. When you call endUpdates, ASTableView begins animating
|
||||
* the operations simultaneously. This method is asynchronous and thread safe. It's important to remeber that the ASTableView will
|
||||
* be processing the updates asynchronously after this call is completed.
|
||||
*
|
||||
* @param animated NO to disable all animations.
|
||||
* @param completion A completion handler block to execute when all of the operations are finished. This block takes a single
|
||||
* Boolean parameter that contains the value YES if all of the related animations completed successfully or
|
||||
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
|
||||
*/
|
||||
- (void)endUpdates;
|
||||
|
||||
/**
|
||||
* Concludes a series of method calls that insert, delete, select, or reload rows and sections of the table view.
|
||||
* You call this method to bracket a series of method calls that begins with beginUpdates and that consists of operations
|
||||
* to insert, delete, select, and reload rows and sections of the table view. When you call endUpdates, ASTableView begins animating
|
||||
* the operations simultaneously. This method is asynchronous and thread safe. It's important to remeber that the ASTableView will
|
||||
* be processing the updates asynchronously after this call and are not guaranteed to be reflected in the ASTableView until
|
||||
* the completion block is executed.
|
||||
*
|
||||
* @param animated NO to disable all animations.
|
||||
* @param completion A completion handler block to execute when all of the operations are finished. This block takes a single
|
||||
* Boolean parameter that contains the value YES if all of the related animations completed successfully or
|
||||
* NO if they were interrupted. This parameter may be nil. If supplied, the block is run on the main thread.
|
||||
*/
|
||||
- (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL completed))completion;
|
||||
|
||||
/**
|
||||
* Inserts one or more sections, with an option to animate the insertion.
|
||||
*
|
||||
@@ -222,6 +247,14 @@
|
||||
*/
|
||||
- (NSArray *)visibleNodes;
|
||||
|
||||
/**
|
||||
* YES to automatically adjust the contentOffset when cells are inserted or deleted "before"
|
||||
* visible cells, maintaining the users' visible scroll position.
|
||||
*
|
||||
* default is NO.
|
||||
*/
|
||||
@property (nonatomic) BOOL automaticallyAdjustsContentOffset;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user