Add UINavigationController and settings bar button to AppRTCMobile.
The navigation controller is used to display the title of the app
and to feature the settings button.
This work is foundation for adding settings screen to the app (see webrtc:6473 for more info)
BUG=webrtc:6618, webrtc:6473
Review-Url: https://codereview.webrtc.org/2455363002
Cr-Commit-Position: refs/heads/master@{#14816}
diff --git a/webrtc/examples/objc/AppRTCMobile/ios/ARDMainView.m b/webrtc/examples/objc/AppRTCMobile/ios/ARDMainView.m
index 9ebee5c..2034036 100644
--- a/webrtc/examples/objc/AppRTCMobile/ios/ARDMainView.m
+++ b/webrtc/examples/objc/AppRTCMobile/ios/ARDMainView.m
@@ -114,7 +114,6 @@
@end
@implementation ARDMainView {
- UILabel *_appLabel;
ARDRoomTextField *_roomText;
UILabel *_callOptionsLabel;
UISwitch *_audioOnlySwitch;
@@ -136,13 +135,6 @@
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
- _appLabel = [[UILabel alloc] initWithFrame:CGRectZero];
- _appLabel.text = @"AppRTCMobile";
- _appLabel.font = [UIFont fontWithName:@"Roboto" size:34];
- _appLabel.textColor = [UIColor colorWithWhite:0 alpha:.2];
- [_appLabel sizeToFit];
- [self addSubview:_appLabel];
-
_roomText = [[ARDRoomTextField alloc] initWithFrame:CGRectZero];
[self addSubview:_roomText];
@@ -263,11 +255,8 @@
CGRect bounds = self.bounds;
CGFloat roomTextWidth = bounds.size.width - 2 * kRoomTextFieldMargin;
CGFloat roomTextHeight = [_roomText sizeThatFits:bounds.size].height;
- _roomText.frame = CGRectMake(kRoomTextFieldMargin,
- kStatusBarHeight + kRoomTextFieldMargin,
- roomTextWidth,
- roomTextHeight);
- _appLabel.center = CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds));
+ _roomText.frame =
+ CGRectMake(kRoomTextFieldMargin, kRoomTextFieldMargin, roomTextWidth, roomTextHeight);
CGFloat callOptionsLabelTop =
CGRectGetMaxY(_roomText.frame) + kCallControlMargin * 4;