Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm

Issue 2953613002: Stop re-adding subviews to keyboard accessory view. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm
diff --git a/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm b/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm
index 79da47e65a36d8035a252e892e7e252362b727ec..7aa8597def888dc8a881a999d9952088f1631873 100644
--- a/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm
+++ b/ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.mm
@@ -43,8 +43,6 @@
- (instancetype)initWithButtons:(NSArray<NSString*>*)buttonTitles
delegate:(id<KeyboardAccessoryViewDelegate>)delegate {
- DCHECK(!IsIPadIdiom());
-
const CGFloat kViewHeight = 44.0;
CGFloat width = [[UIScreen mainScreen] bounds].size.width;
// TODO(734512): Have the creator of the view define the size.
@@ -54,12 +52,12 @@
if (self) {
_buttonTitles = buttonTitles;
_delegate = delegate;
-
+ [self addSubviews];
}
return self;
}
-- (void)willMoveToSuperview:(UIView*)newSuperview {
+- (void)addSubviews {
if (!self.subviews.count)
return;
« no previous file with comments | « ios/chrome/browser/ui/toolbar/new_keyboard_accessory_view.h ('k') | ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698