-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTableView.m
More file actions
36 lines (31 loc) · 830 Bytes
/
TableView.m
File metadata and controls
36 lines (31 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// TableView.m
// AutolayoutTesting
//
// Created by Agathe Battestini on 4/1/13.
// Copyright (c) 2013. All rights reserved.
//
#import "TableView.h"
#import "FixedHeightTableViewController.h"
@implementation TableView
- (CGSize)intrinsicContentSize
{
if (self.delegate) {
id <TableViewDelegate> dlg = (id<TableViewDelegate>) self.delegate;
if ([dlg respondsToSelector:@selector(intrinsicContentSize)]) {
return [dlg intrinsicContentSize];
}
}
return (CGSize){UIViewNoIntrinsicMetric, 200.0};
}
- (void)reloadDataWithCompletion:(void(^)())block
{
[super reloadData];
// [self invalidateIntrinsicContentSize];
// [self layoutIfNeeded];
// NSLog(@"my size %@", NSStringFromCGSize([self intrinsicContentSize]));
if (block) {
block();
}
}
@end