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:
Huy Nguyen
2015-08-09 23:18:25 +03:00
parent e93e97ad5f
commit 7249661990
8 changed files with 27 additions and 87 deletions

View File

@@ -59,6 +59,7 @@ static const NSInteger kMaxLitterSize = 100; // max number of kitten cell
_blurbNodeIndexPath = [NSIndexPath indexPathForItem:0 inSection:0];
self.title = @"Kittens";
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self
action:@selector(toggleEditingMode)];