Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

DetailLabel and TitleLabel layout is NOT set well #479

Open
PCBZ opened this issue Sep 29, 2021 · 1 comment
Open

DetailLabel and TitleLabel layout is NOT set well #479

PCBZ opened this issue Sep 29, 2021 · 1 comment

Comments

@PCBZ
Copy link

PCBZ commented Sep 29, 2021

For the setting constraints of detailLabel or titleLabel,
` if ([self canShowDetail]) {

        [subviewStrings addObject:@"detailLabel"];
        views[[subviewStrings lastObject]] = _detailLabel;
        
        [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(padding@750)-[detailLabel(>=0)]-(padding@750)-|"
                                                                                 options:0 metrics:metrics views:views]];
    }`

the leading and trailing constraints priority are not .default as 1000, which make our label will be exceed the superView.
Could we set it to 1000 from 750 ?

@everlof
Copy link

everlof commented Oct 12, 2021

I agree with this. I've had the same issue and this is also how I solved it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants