mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Improve relayout when constrained size of all nodes is changed:
- In -layoutSubviews of table and collection views, detect changes that cause a different constrained size for nodes, and trigger relayout immediately. - Orientation change can be handled by this solution. So, no need to observe to its events. - Update Kittens example to support iPad (easier to catch bugs on these devices) and add a title to navigation bar (looks a bit nicer).
This commit is contained in:
@@ -156,8 +156,8 @@ typedef NSUInteger ASDataControllerAnimationOptions;
|
||||
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
|
||||
|
||||
/**
|
||||
* Re-measures all loaded nodes. Used for external relayout (relayout that is caused by a change in constrained size of each and every cell node,
|
||||
* for example, after an orientation change).
|
||||
* Re-measures all loaded nodes. Used to respond to a change in size of the containing view
|
||||
* (e.g. ASTableView or ASCollectionView after an orientation change).
|
||||
*/
|
||||
- (void)relayoutAllRows;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user