Merge branch 'mkirk/affix-searchbar'

pull/1/head
Michael Kirk 8 years ago
commit 726fde235a

@ -83,18 +83,22 @@ NS_ASSUME_NONNULL_BEGIN
[searchBar sizeToFit]; [searchBar sizeToFit];
UIView *header = [self.selectThreadViewDelegate createHeaderWithSearchBar:searchBar]; UIView *header = [self.selectThreadViewDelegate createHeaderWithSearchBar:searchBar];
if (!header) {
header = searchBar;
}
[self.view addSubview:header];
[header autoPinWidthToSuperview];
[header autoPinToTopLayoutGuideOfViewController:self withInset:0];
[header setCompressionResistanceVerticalHigh];
[header setContentHuggingVerticalHigh];
// Table // Table
_tableViewController = [OWSTableViewController new]; _tableViewController = [OWSTableViewController new];
_tableViewController.delegate = self; _tableViewController.delegate = self;
[self.view addSubview:self.tableViewController.view]; [self.view addSubview:self.tableViewController.view];
[_tableViewController.view autoPinWidthToSuperview]; [_tableViewController.view autoPinWidthToSuperview];
[_tableViewController.view autoPinToTopLayoutGuideOfViewController:self withInset:0]; [_tableViewController.view autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:header];
if (header) {
_tableViewController.tableView.tableHeaderView = header;
} else {
_tableViewController.tableView.tableHeaderView = searchBar;
}
[self autoPinViewToBottomGuideOrKeyboard:self.tableViewController.view]; [self autoPinViewToBottomGuideOrKeyboard:self.tableViewController.view];
} }

Loading…
Cancel
Save