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
you can use different image ipad proper size overcome error
Comments
Post a Comment