From 69b5272547c878440507e9c0c46272d5405a635a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Morales=20Viv=C3=B3?= Date: Thu, 31 May 2018 17:33:14 -0700 Subject: [PATCH] More code review polish. --- Signal/src/ViewControllers/HomeView/HomeViewController.m | 2 +- SignalMessaging/categories/UIView+OWS.h | 1 - SignalMessaging/categories/UIView+OWS.m | 8 -------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Signal/src/ViewControllers/HomeView/HomeViewController.m b/Signal/src/ViewControllers/HomeView/HomeViewController.m index 65fe725cf..dc9a036b0 100644 --- a/Signal/src/ViewControllers/HomeView/HomeViewController.m +++ b/Signal/src/ViewControllers/HomeView/HomeViewController.m @@ -226,7 +226,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations [emptyBoxLabel autoPinLeadingToSuperviewMargin]; [emptyBoxLabel autoPinTrailingToSuperviewMargin]; - [emptyBoxLabel autoPinVCenterToSuperviewVCenter]; + [emptyBoxLabel autoAlignAxisToSuperviewAxis:ALAxisHorizontal]; UIRefreshControl *pullToRefreshView = [UIRefreshControl new]; pullToRefreshView.tintColor = [UIColor grayColor]; diff --git a/SignalMessaging/categories/UIView+OWS.h b/SignalMessaging/categories/UIView+OWS.h index 8e62cb30e..311e2d1bc 100644 --- a/SignalMessaging/categories/UIView+OWS.h +++ b/SignalMessaging/categories/UIView+OWS.h @@ -88,7 +88,6 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value); - (NSLayoutConstraint *)autoPinTopToSuperviewMarginWithInset:(CGFloat)margin; - (NSLayoutConstraint *)autoPinBottomToSuperviewMargin; - (NSLayoutConstraint *)autoPinBottomToSuperviewMarginWithInset:(CGFloat)margin; -- (NSLayoutConstraint *)autoPinVCenterToSuperviewVCenter; - (NSLayoutConstraint *)autoPinLeadingToTrailingEdgeOfView:(UIView *)view; - (NSLayoutConstraint *)autoPinLeadingToTrailingEdgeOfView:(UIView *)view offset:(CGFloat)margin; diff --git a/SignalMessaging/categories/UIView+OWS.m b/SignalMessaging/categories/UIView+OWS.m index 3e3a198c2..d99cadd3a 100644 --- a/SignalMessaging/categories/UIView+OWS.m +++ b/SignalMessaging/categories/UIView+OWS.m @@ -302,14 +302,6 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value) return constraint; } -- (NSLayoutConstraint *)autoPinVCenterToSuperviewVCenter { - self.translatesAutoresizingMaskIntoConstraints = NO; - - NSLayoutConstraint *constraint = [self.centerYAnchor constraintEqualToAnchor:self.superview.centerYAnchor]; - constraint.active = YES; - return constraint; -} - - (NSLayoutConstraint *)autoPinTopToSuperviewMargin { return [self autoPinTopToSuperviewMarginWithInset:0.f];