From e5b63094b5ba7faf668b0ef86059469affe3e4fa Mon Sep 17 00:00:00 2001 From: Taro Yamamoto Date: Thu, 21 May 2015 10:53:35 +0900 Subject: [PATCH] =?UTF-8?q?contentView=20=E3=81=AE=E5=88=B6=E7=B4=84?= =?UTF-8?q?=E3=81=8C=20topLayoutGuide=20=E3=81=AB=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Classes/NKJPagerViewController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Classes/NKJPagerViewController.m b/Classes/NKJPagerViewController.m index b605e5a..26447cf 100644 --- a/Classes/NKJPagerViewController.m +++ b/Classes/NKJPagerViewController.m @@ -161,9 +161,13 @@ - (void)defaultSetUp [self.delegate viewPagerDidAddContentView]; } else { self.contentView.translatesAutoresizingMaskIntoConstraints = NO; - NSDictionary *views = @{ @"contentView" : self.contentView }; + NSDictionary *views = @{ + @"contentView" : self.contentView, + @"topLayoutGuide" : self.topLayoutGuide, + @"bottomLayoutGuide" : self.bottomLayoutGuide + }; [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"|-0-[contentView]-0-|" options:0 metrics:nil views:views]]; - [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-64-[contentView]-0-|" options:0 metrics:nil views:views]]; + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[topLayoutGuide]-0-[contentView]-0-[bottomLayoutGuide]" options:0 metrics:nil views:views]]; } }