ZWIntroductionViewController icon indicating copy to clipboard operation
ZWIntroductionViewController copied to clipboard

Aspect fit or center background image?

Open hjgabrielsen opened this issue 7 years ago • 7 comments

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

hjgabrielsen avatar Mar 11 '18 09:03 hjgabrielsen

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.

squarezw avatar Mar 14 '18 07:03 squarezw

any news?

hjgabrielsen avatar Apr 17 '18 17:04 hjgabrielsen

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.

squarezw avatar Apr 18 '18 08:04 squarezw

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]; }];

hjgabrielsen avatar Apr 18 '18 08:04 hjgabrielsen

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

squarezw avatar Apr 20 '18 09:04 squarezw

This doesnt work..

hjgabrielsen avatar Apr 22 '18 09:04 hjgabrielsen

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

squarezw avatar Apr 23 '18 11:04 squarezw