From e66c203e258a410dd68b0115808c6a55a599ba94 Mon Sep 17 00:00:00 2001 From: Peter Robinett Date: Tue, 24 Mar 2015 17:50:30 -0400 Subject: [PATCH] Call UIView's layoutSubviews This ensures that subclasses with constraints will be correctly laid out. --- Library/JCNotificationBannerView.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/JCNotificationBannerView.m b/Library/JCNotificationBannerView.m index b037b23..09cd015 100644 --- a/Library/JCNotificationBannerView.m +++ b/Library/JCNotificationBannerView.m @@ -85,6 +85,8 @@ - (void) drawRect:(CGRect)rect { } - (void) layoutSubviews { + [super layoutSubviews]; + if (!(self.frame.size.width > 0)) { return; } BOOL hasTitle = notificationBanner ? (notificationBanner.title.length > 0) : NO;