Commit 0f642932 authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Implement text setters in InfobarBannerViewController

This change will be necessary since the Translate Infobar changes
states through the Translate lifecycle, requiring the banner texts
to be update.

Bug: 1014959
Change-Id: I74e908b33e17529dfa3ebd39a636564ce2df2871
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1897909Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712831}
parent b27ac279
......@@ -332,6 +332,29 @@ const CGFloat kLongPressTimeDurationInSeconds = 0.4;
self.shouldDismissAfterTouchesEnded = YES;
}
#pragma mark - Getters/Setters
- (void)setTitleText:(NSString*)titleText {
_titleText = titleText;
if (self.titleLabel) {
self.titleLabel.text = _titleText;
}
}
- (void)setSubTitleText:(NSString*)subTitleText {
_subTitleText = subTitleText;
if (self.subTitleLabel) {
self.subTitleLabel.text = _subTitleText;
}
}
- (void)setButtonText:(NSString*)buttonText {
_buttonText = buttonText;
if (self.infobarButton) {
[self.infobarButton setTitle:_buttonText forState:UIControlStateNormal];
}
}
#pragma mark - Private Methods
- (void)bannerInfobarButtonWasPressed:(UIButton*)sender {
......
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