Centralize translucency configuration

// FREEBIE
This commit is contained in:
Michael Kirk 2018-05-16 21:51:34 -04:00 committed by Matthew Chen
parent 12c98f4340
commit 33eb4c38cd
15 changed files with 4 additions and 53 deletions

View file

@ -80,7 +80,6 @@
OWSAssert([self.navigationController isKindOfClass:[OWSNavigationController class]]);
[self.navigationController.navigationBar setTranslucent:NO];
self.navigationItem.leftBarButtonItem =
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop
target:self

View file

@ -47,12 +47,6 @@ NS_ASSUME_NONNULL_BEGIN
[self updateTableContents];
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
}
#pragma mark - Table view data source
- (void)updateTableContents

View file

@ -31,7 +31,6 @@ NS_ASSUME_NONNULL_BEGIN
@"CENSORSHIP_CIRCUMVENTION_COUNTRY_VIEW_TITLE", @"Title for the 'censorship circumvention country' view.");
self.view.backgroundColor = [UIColor whiteColor];
[self.navigationController.navigationBar setTranslucent:NO];
[self createViews];
}

View file

@ -500,11 +500,8 @@ typedef enum : NSUInteger {
{
[super viewDidLoad];
// self.topLayoutGuide
[self createContents];
[self.navigationController.navigationBar setTranslucent:NO];
[self registerCellClasses];
[self createConversationScrollButtons];
@ -527,8 +524,6 @@ typedef enum : NSUInteger {
{
[super loadView];
// extendedLayoutIncludesOpaqueBars
// self.extendedLayoutIncludesOpaqueBars = YES;
self.view.backgroundColor = [UIColor ows_toolbarBackgroundColor];
}

View file

@ -252,7 +252,6 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
self.editingDbConnection = OWSPrimaryStorage.sharedManager.newDatabaseConnection;

View file

@ -269,8 +269,6 @@ NS_ASSUME_NONNULL_BEGIN
// a message.
[self.contactsViewHelper.contactsManager requestSystemContactsOnce];
[self.navigationController.navigationBar setTranslucent:NO];
[self showContactAppropriateViews];
}

View file

@ -420,13 +420,6 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68;
#pragma mark - Methods
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];

View file

@ -75,7 +75,6 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
{
[super loadView];
[self.navigationController.navigationBar setTranslucent:NO];
self.title = NSLocalizedString(@"PROFILE_VIEW_TITLE", @"Title for the profile view.");
_avatarViewHelper = [AvatarViewHelper new];
@ -94,7 +93,7 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
UIView *contentView = [UIView containerView];
contentView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:contentView];
[contentView autoPinEdgeToSuperviewEdge:ALEdgeTop];
[contentView autoPinToTopLayoutGuideOfViewController:self withInset:0];
[contentView autoPinWidthToSuperview];
const CGFloat fontSizePoints = ScaleFromIPhone5To7Plus(16.f, 20.f);

View file

@ -97,11 +97,6 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert([self.navigationController isKindOfClass:[OWSNavigationController class]]);
// HACK otherwise CNContactViewController Navbar is shown as black.
// RADAR rdar://28433898 http://www.openradar.me/28433898
// CNContactViewController incompatible with opaque navigation bar
[self.navigationController.navigationBar setTranslucent:YES];
self.title = _thread.groupModel.groupName;
[self updateTableContents];

View file

@ -113,7 +113,7 @@ NS_ASSUME_NONNULL_BEGIN
[self.view addSubview:firstSection];
[firstSection autoSetDimension:ALDimensionHeight toSize:100.f];
[firstSection autoPinWidthToSuperview];
[firstSection autoPinEdgeToSuperviewEdge:ALEdgeTop];
[firstSection autoPinToTopLayoutGuideOfViewController:self withInset:0];
_tableViewController = [OWSTableViewController new];
_tableViewController.delegate = self;
@ -125,13 +125,6 @@ NS_ASSUME_NONNULL_BEGIN
[self updateTableContents];
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
}
- (void)setHasUnsavedChanges:(BOOL)hasUnsavedChanges
{
_hasUnsavedChanges = hasUnsavedChanges;

View file

@ -16,6 +16,8 @@ class SignalNavigationBar: UINavigationBar {
override init(frame: CGRect) {
super.init(frame: frame)
self.isTranslucent = false
// TODO better place to observe?
NotificationCenter.default.addObserver(forName: .OWSWindowManagerCallDidChange, object: nil, queue: nil) { _ in
Logger.debug("\(self.logTag) in \(#function) OWSWindowManagerCallDidChange")

View file

@ -463,13 +463,6 @@ NSString *const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kOWSTableCellIdentifier];
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];

View file

@ -26,7 +26,6 @@
[super loadView];
self.view.backgroundColor = [UIColor whiteColor];
[self.navigationController.navigationBar setTranslucent:NO];
self.title = NSLocalizedString(@"COUNTRYCODE_SELECT_TITLE", @"");
self.countryCodes = [PhoneNumberUtil countryCodesForSearchTerm:nil];

View file

@ -55,7 +55,6 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien
[super loadView];
self.view.backgroundColor = [UIColor whiteColor];
[self.navigationController.navigationBar setTranslucent:NO];
_contactsViewHelper = [[ContactsViewHelper alloc] initWithDelegate:self];

View file

@ -81,12 +81,6 @@ NS_ASSUME_NONNULL_BEGIN
[self updateTableContents];
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self.navigationController.navigationBar setTranslucent:NO];
}
- (void)createViews
{
OWSAssert(self.selectThreadViewDelegate);