objective c - iOS Background Image is repeated in iPad? -


i've got image 1x , 2x , 3x types resolutions 404*750 , 808*1500 , 1212*2250 respectively.

here code:

self.view.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"bgr"]]; 

on iphone background not repeated , good. ipad background repeated 4 times.

would know why happening?

from apple's reference

you can use pattern colors set fill or stroke color solid color. during drawing, image in pattern color tiled necessary cover given area.

so in iphone device image large enough cover area ... in ipad it's not large enough cover area ... repeat itself.

you can use image.xcassets different image iphone , ipad ...

see screen shot

enter image description here

you can use different image ipad proper size overcome error


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -