@@ -374,7 +374,9 @@ - (UIView *)viewForPage:(EAIntroPage *)page atXIndex:(CGFloat)xIndex {
374
374
titleLabel.translatesAutoresizingMaskIntoConstraints = NO ;
375
375
376
376
[pageView addSubview: titleLabel];
377
- [pageView addConstraint: [NSLayoutConstraint constraintWithItem: pageView attribute: NSLayoutAttributeBottom relatedBy: NSLayoutRelationEqual toItem: titleLabel attribute: NSLayoutAttributeTop multiplier: 1.0 constant: page.titlePositionY]];
377
+ NSLayoutConstraint *weakConstraint = [NSLayoutConstraint constraintWithItem: pageView attribute: NSLayoutAttributeBottom relatedBy: NSLayoutRelationEqual toItem: titleLabel attribute: NSLayoutAttributeTop multiplier: 1.0 constant: page.titlePositionY];
378
+ weakConstraint.priority = UILayoutPriorityDefaultHigh;
379
+ [pageView addConstraint: weakConstraint];
378
380
[pageView addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|-10-[titleLabel]-10-|" options: NSLayoutFormatAlignAllTop metrics: nil views: @{@" titleLabel" : titleLabel}]];
379
381
}
380
382
@@ -391,7 +393,9 @@ - (UIView *)viewForPage:(EAIntroPage *)page atXIndex:(CGFloat)xIndex {
391
393
descLabel.translatesAutoresizingMaskIntoConstraints = NO ;
392
394
393
395
[pageView addSubview: descLabel];
394
- [pageView addConstraint: [NSLayoutConstraint constraintWithItem: pageView attribute: NSLayoutAttributeBottom relatedBy: NSLayoutRelationEqual toItem: descLabel attribute: NSLayoutAttributeTop multiplier: 1.0 constant: page.descPositionY]];
396
+ NSLayoutConstraint *weakConstraint = [NSLayoutConstraint constraintWithItem: pageView attribute: NSLayoutAttributeBottom relatedBy: NSLayoutRelationEqual toItem: descLabel attribute: NSLayoutAttributeTop multiplier: 1.0 constant: page.descPositionY];
397
+ weakConstraint.priority = UILayoutPriorityDefaultHigh;
398
+ [pageView addConstraint: weakConstraint];
395
399
[pageView addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|-[descLabel]-|" options: NSLayoutFormatAlignAllTop metrics: nil views: @{@" descLabel" : descLabel}]];
396
400
}
397
401
@@ -440,7 +444,7 @@ - (void)buildTitleView {
440
444
NSDictionary *views = @{@" titleView" : self.titleView };
441
445
NSDictionary *metrics = @{@" titleViewTopPadding" : @(self.titleViewY ), @" titleViewHeight" : @(self.titleView .frame .size .height ), @" titleViewWidth" : @(self.titleView .frame .size .width )};
442
446
443
- [self .titleViewConstraints addObjectsFromArray: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|-titleViewTopPadding-[titleView(titleViewHeight)]" options: NSLayoutFormatAlignAllLeft metrics: metrics views: views]];
447
+ [self .titleViewConstraints addObjectsFromArray: [NSLayoutConstraint constraintsWithVisualFormat: @" V:|-titleViewTopPadding@750 -[titleView(titleViewHeight)]" options: NSLayoutFormatAlignAllLeft metrics: metrics views: views]];
444
448
[self .titleViewConstraints addObjectsFromArray: [NSLayoutConstraint constraintsWithVisualFormat: @" H:[titleView(titleViewWidth)]" options: NSLayoutFormatAlignAllTop metrics: metrics views: views]];
445
449
[self .titleViewConstraints addObject: [NSLayoutConstraint constraintWithItem: self .titleView attribute: NSLayoutAttributeCenterX relatedBy: NSLayoutRelationEqual toItem: self attribute: NSLayoutAttributeCenterX multiplier: 1.0 constant: 0.0 ]];
446
450
@@ -471,7 +475,7 @@ - (void)buildFooterView {
471
475
NSDictionary *metrics = @{@" pageControlBottomPadding" : @(self.pageControlY - self.pageControl .frame .size .height ), @" pageControlHeight" : @(self.pageControl .frame .size .height ), @" skipButtonBottomPadding" : @(self.skipButtonY - self.skipButton .frame .size .height ), @" skipButtonSideMargin" : @(self.skipButtonSideMargin ), @" skipButtonWidth" : @(self.skipButton .frame .size .width ), @" skipButtonHeight" : @(self.skipButton .frame .size .height )};
472
476
473
477
[self .footerConstraints addObjectsFromArray: [NSLayoutConstraint constraintsWithVisualFormat: @" H:|-[pageControl]-|" options: NSLayoutFormatAlignAllCenterX metrics: metrics views: views]];
474
- [self .footerConstraints addObjectsFromArray: [NSLayoutConstraint constraintsWithVisualFormat: @" V:[pageControl(pageControlHeight)]-pageControlBottomPadding-|" options: NSLayoutFormatAlignAllBottom metrics: metrics views: views]];
478
+ [self .footerConstraints addObjectsFromArray: [NSLayoutConstraint constraintsWithVisualFormat: @" V:[pageControl(pageControlHeight)]-pageControlBottomPadding@750 -|" options: NSLayoutFormatAlignAllBottom metrics: metrics views: views]];
475
479
476
480
if (self.skipButton && !self.skipButton .hidden ) {
477
481
if (self.skipButtonAlignment == EAViewAlignmentCenter) {
0 commit comments