From f201ddbba503f57452eafc955e97ba301214c2c6 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 17 May 2017 12:52:33 -0400 Subject: [PATCH] Respond to CR. // FREEBIE --- Signal/src/UIView+OWS.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Signal/src/UIView+OWS.m b/Signal/src/UIView+OWS.m index fc60a29ae..9531b793c 100644 --- a/Signal/src/UIView+OWS.m +++ b/Signal/src/UIView+OWS.m @@ -150,7 +150,7 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value) - (CGFloat)bottom { - return self.frame.origin.x + self.frame.size.height; + return self.frame.origin.y + self.frame.size.height; } - (CGFloat)width @@ -165,6 +165,8 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value) - (void)centerOnSuperview { + OWSAssert(self.superview); + self.frame = CGRectMake( round(self.superview.bounds.origin.x + (self.superview.bounds.size.width - self.frame.size.width) * 0.5f), round(self.superview.bounds.origin.y + (self.superview.bounds.size.height - self.frame.size.height) * 0.5f),