Skip to content

Commit

Permalink
contentView の制約が topLayoutGuide になってなかった
Browse files Browse the repository at this point in the history
  • Loading branch information
tarop committed May 21, 2015
1 parent 38626db commit e5b6309
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/NKJPagerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
}
}

Expand Down

0 comments on commit e5b6309

Please sign in to comment.