Commit 47b872e6 authored by Yuke Liao's avatar Yuke Liao Committed by Commit Bot

Revert "Respect safe area for NTP view"

This reverts commit d909eb87.

Reason for revert: This CL is causing RecentTabsTableTestCase/testClosedTabAppearsInRecentTabsPanel to fail on iPad: https://build.chromium.org/p/chromium.fyi/builders/EarlGreyiOS/builds/31975

Original change's description:
> Respect safe area for NTP view
> 
> The NTP view cannot use the safeAreaInsets property directly as it is
> snapshotted before being inserted in the view hierarchy, and the safe
> area is only available for views in the view hierarchy.
> This CL introduces a property mirroring the safe area once the view is
> in the view hierarchy. But it is also set up with the value used in the
> first frame, allowing the snapshot to be done as if the view was in the
> view hierarchy.
> 
> Bug: 767869
> Change-Id: I605566105862e9f4c557736ec65df5f8ab1fc76b
> Reviewed-on: https://chromium-review.googlesource.com/681942
> Commit-Queue: Gauthier Ambard <gambard@chromium.org>
> Reviewed-by: Rohit Rao (ping after 24h) <rohitrao@chromium.org>
> Reviewed-by: Jean-François Geyelin <jif@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#505041}

TBR=rohitrao@chromium.org,jif@chromium.org,gambard@chromium.org

Change-Id: I05bb5751f1ec6aec184dfe6ccff7741f2df4182d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 767869
Reviewed-on: https://chromium-review.googlesource.com/690817Reviewed-by: default avatarYuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505118}
parent 70413e96
...@@ -3273,13 +3273,6 @@ bubblePresenterForFeature:(const base::Feature&)feature ...@@ -3273,13 +3273,6 @@ bubblePresenterForFeature:(const base::Feature&)feature
std::string url_host = url.host(); std::string url_host = url.host();
if (url_host == kChromeUINewTabHost || if (url_host == kChromeUINewTabHost ||
(IsIPadIdiom() && url_host == kChromeUIBookmarksHost)) { (IsIPadIdiom() && url_host == kChromeUIBookmarksHost)) {
CGFloat fakeStatusBarHeight = _fakeStatusBarView.frame.size.height;
UIEdgeInsets safeAreaInset = UIEdgeInsetsZero;
if (@available(iOS 11.0, *)) {
safeAreaInset = self.view.safeAreaInsets;
}
safeAreaInset.top = MAX(safeAreaInset.top - fakeStatusBarHeight, 0);
NewTabPageController* pageController = NewTabPageController* pageController =
[[NewTabPageController alloc] initWithUrl:url [[NewTabPageController alloc] initWithUrl:url
loader:self loader:self
...@@ -3290,8 +3283,7 @@ bubblePresenterForFeature:(const base::Feature&)feature ...@@ -3290,8 +3283,7 @@ bubblePresenterForFeature:(const base::Feature&)feature
toolbarDelegate:self toolbarDelegate:self
tabModel:_model tabModel:_model
parentViewController:self parentViewController:self
dispatcher:self.dispatcher dispatcher:self.dispatcher];
safeAreaInset:safeAreaInset];
pageController.swipeRecognizerProvider = self.sideSwipeController; pageController.swipeRecognizerProvider = self.sideSwipeController;
// Panel is always NTP for iPhone. // Panel is always NTP for iPhone.
......
...@@ -24,17 +24,11 @@ ...@@ -24,17 +24,11 @@
@interface NewTabPageBar : UIView<UIGestureRecognizerDelegate> @interface NewTabPageBar : UIView<UIGestureRecognizerDelegate>
@property(nonatomic, strong) NSArray* items; @property(nonatomic, strong) NSArray* items;
// Which button is currently selected.
@property(nonatomic, assign) NSUInteger selectedIndex; @property(nonatomic, assign) NSUInteger selectedIndex;
// Percentage of the overlay that sits over the tab bar buttons.
@property(nonatomic, assign) CGFloat overlayPercentage; @property(nonatomic, assign) CGFloat overlayPercentage;
@property(nonatomic, readonly, strong) NSArray* buttons; @property(nonatomic, readonly, strong) NSArray* buttons;
@property(nonatomic, weak) id<NewTabPageBarDelegate> delegate; @property(nonatomic, weak) id<NewTabPageBarDelegate> delegate;
// Safe area set by the NTP view. This is used as the safeAreaInsets of this
// view as it needs to be used before the safeAreaInsets is set up.
@property(nonatomic, assign) UIEdgeInsets safeAreaInsetFromNTPView;
// Changes the colors of the buttons and overlay depending on the content offset // Changes the colors of the buttons and overlay depending on the content offset
// of the scroll view. Tablet Incognito only. // of the scroll view. Tablet Incognito only.
- (void)updateColorsForScrollView:(UIScrollView*)scrollView; - (void)updateColorsForScrollView:(UIScrollView*)scrollView;
......
...@@ -40,9 +40,7 @@ const int kNumberOfTabsIncognito = 2; ...@@ -40,9 +40,7 @@ const int kNumberOfTabsIncognito = 2;
} }
@property(nonatomic, readwrite, strong) NSArray* buttons; @property(nonatomic, readwrite, strong) NSArray* buttons;
@property(nonatomic, readwrite, strong) UIButton* popupButton;
// View containing the content and respecting the safe area.
@property(nonatomic, strong) UIView* contentView;
- (void)setup; - (void)setup;
- (void)calculateButtonWidth; - (void)calculateButtonWidth;
...@@ -52,23 +50,29 @@ const int kNumberOfTabsIncognito = 2; ...@@ -52,23 +50,29 @@ const int kNumberOfTabsIncognito = 2;
@end @end
@implementation NewTabPageBar { @implementation NewTabPageBar {
// Which button is currently selected.
NSUInteger selectedIndex_;
// Don't allow tabbar animations on startup, only after first tap. // Don't allow tabbar animations on startup, only after first tap.
BOOL canAnimate_; BOOL canAnimate_;
__weak id<NewTabPageBarDelegate> delegate_;
// Logo view, used to center the tab buttons.
UIImageView* logoView_;
// Overlay view, used to highlight the selected button. // Overlay view, used to highlight the selected button.
UIImageView* overlayView_; UIImageView* overlayView_;
// Overlay view, used to highlight the selected button. // Overlay view, used to highlight the selected button.
UIView* overlayColorView_; UIView* overlayColorView_;
// Width of a button. // Width of a button.
CGFloat buttonWidth_; CGFloat buttonWidth_;
// Percentage overlay sits over tab bar buttons.
CGFloat overlayPercentage_;
} }
@synthesize items = items_; @synthesize items = items_;
@synthesize selectedIndex = selectedIndex_; @synthesize selectedIndex = selectedIndex_;
@synthesize popupButton = popupButton_;
@synthesize buttons = buttons_; @synthesize buttons = buttons_;
@synthesize delegate = delegate_; @synthesize delegate = delegate_;
@synthesize overlayPercentage = overlayPercentage_; @synthesize overlayPercentage = overlayPercentage_;
@synthesize contentView = _contentView;
@synthesize safeAreaInsetFromNTPView = _safeAreaInsetFromNTPView;
- (id)initWithFrame:(CGRect)frame { - (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];
...@@ -89,10 +93,10 @@ const int kNumberOfTabsIncognito = 2; ...@@ -89,10 +93,10 @@ const int kNumberOfTabsIncognito = 2;
- (void)setup { - (void)setup {
self.selectedIndex = NSNotFound; self.selectedIndex = NSNotFound;
canAnimate_ = NO; canAnimate_ = NO;
self.backgroundColor = [UIColor whiteColor]; self.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
_contentView = [[UIView alloc] initWithFrame:CGRectZero]; self.autoresizesSubviews = YES;
[self addSubview:_contentView]; self.backgroundColor = [UIColor clearColor];
if ([self showOverlay]) { if ([self showOverlay]) {
overlayView_ = overlayView_ =
...@@ -109,7 +113,7 @@ const int kNumberOfTabsIncognito = 2; ...@@ -109,7 +113,7 @@ const int kNumberOfTabsIncognito = 2;
setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin]; UIViewAutoresizingFlexibleRightMargin];
[overlayView_ addSubview:overlayColorView_]; [overlayView_ addSubview:overlayColorView_];
[_contentView addSubview:overlayView_]; [self addSubview:overlayView_];
} }
// Make the drop shadow. // Make the drop shadow.
...@@ -128,25 +132,22 @@ const int kNumberOfTabsIncognito = 2; ...@@ -128,25 +132,22 @@ const int kNumberOfTabsIncognito = 2;
- (void)layoutSubviews { - (void)layoutSubviews {
[super layoutSubviews]; [super layoutSubviews];
CGRect contentViewFrame =
UIEdgeInsetsInsetRect(self.frame, self.safeAreaInsetFromNTPView);
contentViewFrame.origin.y = 0;
self.contentView.frame = contentViewFrame;
// |buttonWidth_| changes with the screen orientation when the NTP button bar // |buttonWidth_| changes with the screen orientation when the NTP button bar
// is enabled. // is enabled.
[self calculateButtonWidth]; [self calculateButtonWidth];
CGFloat buttonPadding = floor((CGRectGetWidth(self.contentView.bounds) - CGFloat logoWidth = logoView_.image.size.width;
CGFloat padding = [self useIconsInButtons] ? logoWidth : 0;
CGFloat buttonPadding = floor((CGRectGetWidth(self.bounds) - padding -
buttonWidth_ * self.buttons.count) / buttonWidth_ * self.buttons.count) /
2); 2 +
padding);
for (NSUInteger i = 0; i < self.buttons.count; ++i) { for (NSUInteger i = 0; i < self.buttons.count; ++i) {
NewTabPageBarButton* button = [self.buttons objectAtIndex:i]; NewTabPageBarButton* button = [self.buttons objectAtIndex:i];
LayoutRect layout = LayoutRect layout = LayoutRectMake(
LayoutRectMake(buttonPadding + (i * buttonWidth_), buttonPadding + (i * buttonWidth_), CGRectGetWidth(self.bounds), 0,
CGRectGetWidth(self.contentView.bounds), 0, buttonWidth_, buttonWidth_, CGRectGetHeight(self.bounds));
CGRectGetHeight(self.contentView.bounds));
button.frame = LayoutRectGetRect(layout); button.frame = LayoutRectGetRect(layout);
[button [button
setContentToDisplay:[self useIconsInButtons] setContentToDisplay:[self useIconsInButtons]
...@@ -165,14 +166,13 @@ const int kNumberOfTabsIncognito = 2; ...@@ -165,14 +166,13 @@ const int kNumberOfTabsIncognito = 2;
} }
- (CGSize)sizeThatFits:(CGSize)size { - (CGSize)sizeThatFits:(CGSize)size {
return CGSizeMake(size.width, return CGSizeMake(size.width, kBarHeight);
kBarHeight + self.safeAreaInsetFromNTPView.bottom);
} }
- (void)calculateButtonWidth { - (void)calculateButtonWidth {
if (IsCompact()) { if (IsCompact()) {
if ([items_ count] > 0) { if ([items_ count] > 0) {
buttonWidth_ = self.contentView.bounds.size.width / [items_ count]; buttonWidth_ = self.bounds.size.width / [items_ count];
} else { } else {
// In incognito on phones, there are no items shown. // In incognito on phones, there are no items shown.
buttonWidth_ = 0; buttonWidth_ = 0;
...@@ -202,10 +202,10 @@ const int kNumberOfTabsIncognito = 2; ...@@ -202,10 +202,10 @@ const int kNumberOfTabsIncognito = 2;
for (NSUInteger i = 0; i < newItems.count; ++i) { for (NSUInteger i = 0; i < newItems.count; ++i) {
NewTabPageBarItem* item = [newItems objectAtIndex:i]; NewTabPageBarItem* item = [newItems objectAtIndex:i];
NewTabPageBarButton* button = [NewTabPageBarButton buttonWithItem:item]; NewTabPageBarButton* button = [NewTabPageBarButton buttonWithItem:item];
button.frame = CGRectIntegral( button.frame = CGRectIntegral(CGRectMake(
CGRectMake(i * buttonWidth_, 0, buttonWidth_, kBarHeight)); i * buttonWidth_, 0, buttonWidth_, self.bounds.size.height));
[self setupButton:button]; [self setupButton:button];
[self.contentView addSubview:button]; [self addSubview:button];
[newButtons addObject:button]; [newButtons addObject:button];
} }
self.buttons = newButtons; self.buttons = newButtons;
......
...@@ -89,8 +89,7 @@ std::string FragmentFromIdentifier(ntp_home::PanelIdentifier panel); ...@@ -89,8 +89,7 @@ std::string FragmentFromIdentifier(ntp_home::PanelIdentifier panel);
dispatcher:(id<ApplicationCommands, dispatcher:(id<ApplicationCommands,
BrowserCommands, BrowserCommands,
OmniboxFocuser, OmniboxFocuser,
UrlLoader>)dispatcher UrlLoader>)dispatcher;
safeAreaInset:(UIEdgeInsets)safeAreaInset;
// Select a panel based on the given |panelType|. // Select a panel based on the given |panelType|.
- (void)selectPanel:(ntp_home::PanelIdentifier)panelType; - (void)selectPanel:(ntp_home::PanelIdentifier)panelType;
......
...@@ -220,8 +220,7 @@ enum { ...@@ -220,8 +220,7 @@ enum {
dispatcher:(id<ApplicationCommands, dispatcher:(id<ApplicationCommands,
BrowserCommands, BrowserCommands,
OmniboxFocuser, OmniboxFocuser,
UrlLoader>)dispatcher UrlLoader>)dispatcher {
safeAreaInset:(UIEdgeInsets)safeAreaInset {
self = [super initWithNibName:nil url:url]; self = [super initWithNibName:nil url:url];
if (self) { if (self) {
DCHECK(browserState); DCHECK(browserState);
...@@ -241,12 +240,11 @@ enum { ...@@ -241,12 +240,11 @@ enum {
[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 412)]; [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 412)];
[scrollView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | [scrollView setAutoresizingMask:(UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight)]; UIViewAutoresizingFlexibleHeight)];
NewTabPageBar* tabBar =
NewTabPageBar* tabBar = [[NewTabPageBar alloc] init]; [[NewTabPageBar alloc] initWithFrame:CGRectMake(0, 412, 320, 48)];
_view = [[NewTabPageView alloc] initWithFrame:CGRectZero _view = [[NewTabPageView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)
andScrollView:scrollView andScrollView:scrollView
andTabBar:tabBar]; andTabBar:tabBar];
_view.safeAreaInsetForToolbar = safeAreaInset;
[tabBar setDelegate:self]; [tabBar setDelegate:self];
bool isIncognito = _browserState->IsOffTheRecord(); bool isIncognito = _browserState->IsOffTheRecord();
...@@ -478,7 +476,7 @@ enum { ...@@ -478,7 +476,7 @@ enum {
// Update selectedIndex and scroll position as the scroll view moves. // Update selectedIndex and scroll position as the scroll view moves.
- (void)scrollViewDidScroll:(UIScrollView*)scrollView { - (void)scrollViewDidScroll:(UIScrollView*)scrollView {
if (!_scrollInitialized || PresentNTPPanelModally()) if (!_scrollInitialized)
return; return;
// Position is used to track the exact X position of the scroll view, whereas // Position is used to track the exact X position of the scroll view, whereas
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h" #include "ios/chrome/browser/sessions/ios_chrome_tab_restore_service_factory.h"
#import "ios/chrome/browser/sessions/test_session_service.h" #import "ios/chrome/browser/sessions/test_session_service.h"
#import "ios/chrome/browser/tabs/tab_model.h" #import "ios/chrome/browser/tabs/tab_model.h"
#import "ios/chrome/browser/ui/ntp/modal_ntp.h"
#import "ios/chrome/browser/ui/ntp/new_tab_page_view.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_view.h"
#include "ios/chrome/browser/ui/ui_util.h" #include "ios/chrome/browser/ui/ui_util.h"
#include "ios/chrome/test/block_cleanup_test.h" #include "ios/chrome/test/block_cleanup_test.h"
...@@ -80,8 +79,7 @@ class NewTabPageControllerTest : public BlockCleanupTest { ...@@ -80,8 +79,7 @@ class NewTabPageControllerTest : public BlockCleanupTest {
toolbarDelegate:nil toolbarDelegate:nil
tabModel:tabModel_ tabModel:tabModel_
parentViewController:parentViewController_ parentViewController:parentViewController_
dispatcher:nil dispatcher:nil];
safeAreaInset:UIEdgeInsetsZero];
incognitoController_ = [[NewTabPageController alloc] incognitoController_ = [[NewTabPageController alloc]
initWithUrl:url initWithUrl:url
...@@ -94,8 +92,7 @@ class NewTabPageControllerTest : public BlockCleanupTest { ...@@ -94,8 +92,7 @@ class NewTabPageControllerTest : public BlockCleanupTest {
toolbarDelegate:nil toolbarDelegate:nil
tabModel:nil tabModel:nil
parentViewController:parentViewController_ parentViewController:parentViewController_
dispatcher:nil dispatcher:nil];
safeAreaInset:UIEdgeInsetsZero];
}; };
void TearDown() override { void TearDown() override {
...@@ -129,15 +126,14 @@ TEST_F(NewTabPageControllerTest, NewTabBarItemDidChange) { ...@@ -129,15 +126,14 @@ TEST_F(NewTabPageControllerTest, NewTabBarItemDidChange) {
NewTabPageBar* bar = [NTPView tabBar]; NewTabPageBar* bar = [NTPView tabBar];
NSUInteger bookmarkIndex = 0; NSUInteger bookmarkIndex = 0;
UIButton* button = [[bar buttons] objectAtIndex:bookmarkIndex]; UIButton* button = [[bar buttons] objectAtIndex:bookmarkIndex];
UIControlEvents event = !PresentNTPPanelModally() UIControlEvents event =
? UIControlEventTouchDown IsIPadIdiom() ? UIControlEventTouchDown : UIControlEventTouchUpInside;
: UIControlEventTouchUpInside;
[button sendActionsForControlEvents:event]; [button sendActionsForControlEvents:event];
// Expecting bookmarks panel to be loaded now and to be the current controller // Expecting bookmarks panel to be loaded now and to be the current controller
// on iPad but not iPhone. // on iPad but not iPhone.
// Deliberately comparing pointers. // Deliberately comparing pointers.
if (!PresentNTPPanelModally()) { if (IsIPadIdiom()) {
EXPECT_EQ([controller_ currentController], EXPECT_EQ([controller_ currentController],
(id<NewTabPagePanelProtocol>)[controller_ bookmarkController]); (id<NewTabPagePanelProtocol>)[controller_ bookmarkController]);
} else { } else {
...@@ -158,7 +154,7 @@ TEST_F(NewTabPageControllerTest, SelectBookmarkPanel) { ...@@ -158,7 +154,7 @@ TEST_F(NewTabPageControllerTest, SelectBookmarkPanel) {
// Expecting bookmarks panel to be loaded now and to be the current controller // Expecting bookmarks panel to be loaded now and to be the current controller
// on iPad but not iPhone. // on iPad but not iPhone.
// Deliberately comparing pointers. // Deliberately comparing pointers.
if (!PresentNTPPanelModally()) { if (IsIPadIdiom()) {
EXPECT_EQ([controller_ currentController], EXPECT_EQ([controller_ currentController],
(id<NewTabPagePanelProtocol>)[controller_ bookmarkController]); (id<NewTabPagePanelProtocol>)[controller_ bookmarkController]);
} else { } else {
...@@ -179,7 +175,7 @@ TEST_F(NewTabPageControllerTest, SelectIncognitoPanel) { ...@@ -179,7 +175,7 @@ TEST_F(NewTabPageControllerTest, SelectIncognitoPanel) {
// Expecting bookmarks panel to be loaded now and to be the current controller // Expecting bookmarks panel to be loaded now and to be the current controller
// on iPad but not iPhone. // on iPad but not iPhone.
// Deliberately comparing pointers. // Deliberately comparing pointers.
if (!PresentNTPPanelModally()) { if (IsIPadIdiom()) {
EXPECT_EQ( EXPECT_EQ(
[incognitoController_ currentController], [incognitoController_ currentController],
(id<NewTabPagePanelProtocol>)[incognitoController_ bookmarkController]); (id<NewTabPagePanelProtocol>)[incognitoController_ bookmarkController]);
......
...@@ -14,12 +14,6 @@ ...@@ -14,12 +14,6 @@
@interface NewTabPageView : UIView @interface NewTabPageView : UIView
@property(nonatomic, weak, readonly) UIScrollView* scrollView; @property(nonatomic, weak, readonly) UIScrollView* scrollView;
@property(nonatomic, weak, readonly) NewTabPageBar* tabBar; @property(nonatomic, weak, readonly) NewTabPageBar* tabBar;
// Safe area to be used for toolbar. Once the view is part of the view hierarchy
// and has its own safe area set, this is equal to safeAreaInsets. But as a
// snapshot of the view is taken before it is inserted in the view hierarchy,
// this property needs to be set to what would be the safe area after being
// inserted in the view hierarchy, before the snapshot is taken.
@property(nonatomic, assign) UIEdgeInsets safeAreaInsetForToolbar;
- (instancetype)initWithFrame:(CGRect)frame - (instancetype)initWithFrame:(CGRect)frame
andScrollView:(UIScrollView*)scrollView andScrollView:(UIScrollView*)scrollView
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
@synthesize scrollView = scrollView_; @synthesize scrollView = scrollView_;
@synthesize tabBar = tabBar_; @synthesize tabBar = tabBar_;
@synthesize safeAreaInsetForToolbar = _safeAreaInsetForToolbar;
- (instancetype)initWithFrame:(CGRect)frame - (instancetype)initWithFrame:(CGRect)frame
andScrollView:(UIScrollView*)scrollView andScrollView:(UIScrollView*)scrollView
...@@ -34,11 +33,6 @@ ...@@ -34,11 +33,6 @@
return self; return self;
} }
- (void)safeAreaInsetsDidChange {
self.safeAreaInsetForToolbar = self.safeAreaInsets;
[super safeAreaInsetsDidChange];
}
- (instancetype)initWithFrame:(CGRect)frame { - (instancetype)initWithFrame:(CGRect)frame {
NOTREACHED(); NOTREACHED();
return nil; return nil;
...@@ -49,13 +43,6 @@ ...@@ -49,13 +43,6 @@
return nil; return nil;
} }
#pragma mark - Properties
- (void)setSafeAreaInsetForToolbar:(UIEdgeInsets)safeAreaInsetForToolbar {
_safeAreaInsetForToolbar = safeAreaInsetForToolbar;
self.tabBar.safeAreaInsetFromNTPView = safeAreaInsetForToolbar;
}
- (void)setFrame:(CGRect)frame { - (void)setFrame:(CGRect)frame {
// When transitioning the iPhone xib to an iPad idiom, the setFrame call below // When transitioning the iPhone xib to an iPad idiom, the setFrame call below
// can sometimes fire a scrollViewDidScroll event which changes the // can sometimes fire a scrollViewDidScroll event which changes the
...@@ -114,7 +101,6 @@ ...@@ -114,7 +101,6 @@
CGRectGetMinX(self.bounds), CGRectGetMinY(self.bounds), CGRectGetMinX(self.bounds), CGRectGetMinY(self.bounds),
CGRectGetWidth(self.bounds), CGRectGetMinY(self.tabBar.frame)); CGRectGetWidth(self.bounds), CGRectGetMinY(self.tabBar.frame));
} }
[self updateScrollViewContentSize];
// When using a new_tab_page_view in autolayout -setFrame is never called, // When using a new_tab_page_view in autolayout -setFrame is never called,
// which means all the logic to keep the selected scroll index set is never // which means all the logic to keep the selected scroll index set is never
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment