Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)layoutContainerView {
- CGFloat y;
- if (self.mode == kLDPPostsFeedViewModeSearch) {
- y = CGRectGetMaxY(self.searchBar.frame);
- if (@available(iOS 11.0, *)) {
- y += self.safeAreaInsets.top;
- }
- // TODO: remove this hack.
- // On new iPhones needs place containerView under the searchBar, so that black bottom bar on searchBar will not be visible
- if ([LDPHelper isIphoneXSeries]) {
- y -= 2;
- }
- } else {
- y = CGRectGetMaxY(self.feedPostsTypesScrollView.frame);
- }
- CGRect frame = self.containerView.frame;
- frame.origin.x = 0;
- frame.origin.y = y;
- frame.size.width = CGRectGetWidth(self.frame);
- CGFloat height = CGRectGetHeight(self.frame) - CGRectGetMinY(frame);
- frame.size.height = height;
- self.containerView.frame = frame;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement