Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aspect fit or center background image? #11

Open
hjgabrielsen opened this issue Mar 11, 2018 · 7 comments
Open

Aspect fit or center background image? #11

hjgabrielsen opened this issue Mar 11, 2018 · 7 comments

Comments

@hjgabrielsen
Copy link

This becomes stretchy on iPhone X , any way to change the Aspect fit or center background image?

@squarezw
Copy link
Owner

Hi @hjgabrielsen
Thanks for your comment, I'll take a look at this. and then will let you know the right way if I can find.

@hjgabrielsen
Copy link
Author

any news?

@squarezw
Copy link
Owner

Hi, hjgabrielsen.

Unfortunately, no good news now. I tried that a little bit before. seems like a lot of things to do. do you have any idea?

btw, I will also tackle this issue by any chance.

@hjgabrielsen
Copy link
Author

Im trying this in ZWIntroductionView.m

Line 180

  • (void)addBackgroundViews
    {
    CGRect frame = self.bounds;
    NSMutableArray *tmpArray = [NSMutableArray new];
    [[[[self backgroundImageNames] reverseObjectEnumerator] allObjects] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:obj]];
    imageView.frame = frame;
    imageView.contentMode = UIViewContentModeScaleAspectFit;
    imageView.tag = idx + 1;
    [tmpArray addObject:imageView];
    [self addSubview:imageView];
    }];

@squarezw
Copy link
Owner

Did you try that already? Is it what you need?

@hjgabrielsen
Copy link
Author

This doesnt work..

@squarezw
Copy link
Owner

yes, that's why I said is not easy to adjust the best solution.

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

No branches or pull requests

2 participants