ios - iOS7 image added programmatically is blurred -


this how add image:

uiimageview *imageholder = [[uiimageview alloc] initwithframe:     cgrectmake((self.view.frame.size.width/2) - (290/2),(self.view.frame.size.height) - (140 * 1.8), 290, 140)]; uiimage *image = [uiimage imagenamed:@"no-pins.png"]; imageholder.image = image; imageholder.contentmode = uiviewcontentmodescaleaspectfit; // optional: // [imageholder sizetofit]; [self.view addsubview:imageholder]; 

the size of image (retina version) same size in cgrectmake above. image little blurred. can reduce blur when edit image , give higher resolution in photoshop.

but images add through storyboard fine in quality. ideas might wrong?

for retina graphics, image size should twice size of frame of image view. allows image use scale of 2 take advantage of retina screen capability. so, should have 1 image of size 290x140 (if supporting non-retina devices) , 1 image of size 580x280 (this @2x image).

the frame of view description of position , size of view within view hierarchy (in terms of superview coordinate system). if have fractional values in frame size or position can 'blurring' effects.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -