retina-display

How to support both iPad and iPhone retina graphics in universal apps

痴心易碎 提交于 2019-11-26 14:01:14
Apple presented new iPad that support retina graphics. I saw this link retina graphic in apple apps . As you can see apple just use "@2x" suffix for retina iPad display. I have an universal app. So how to support retina in new iPad and iPhone? Will iPad retina use suffix "@2x" similar to iPad? rowwingman I just created a test app and tested. So for devices without retina: ImageName.png - For iPhone/iPod ImageName~ipad.png -- For iPad For devices with retina display: ImageName@2x.png - For iPhone/iPod ImageName@2x~ipad.png -- For iPad And you can still use @2x if your iPhone high resolution

iOS 5.1 with Xcode 4.2 and retina in iPad 3

流过昼夜 提交于 2019-11-26 10:16:09
问题 i have a Mac with Mac OS X Snow Leopard, can i add iOS 5.1 to it? With the new resolution for iPad 3, how we will do with images, because if the app will run in iPhone 3GS, 4 and iPad 3 i think we should have 3 images with different name like @3x.png or .. thank you. 回答1: iOS 5.1 comes with Xcode 4.3.1 which is only available for Lion — the only download available in the Developer section on Apple's Developer portal for iOS 5.1. Basically, the iPad images are going to be double the size of

How to save PNG file from NSImage (retina issues)

江枫思渺然 提交于 2019-11-26 09:26:07
问题 I\'m doing some operations on images and after I\'m done, I want to save the image as PNG on disk. I\'m doing the following: + (void)saveImage:(NSImage *)image atPath:(NSString *)path { [image lockFocus] ; NSBitmapImageRep *imageRepresentation = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0.0, 0.0, image.size.width, image.size.height)] ; [image unlockFocus] ; NSData *data = [imageRepresentation representationUsingType:NSPNGFileType properties:nil]; [data writeToFile:path

What is the best way to detect retina support on a device using JavaScript?

╄→гoц情女王★ 提交于 2019-11-26 09:21:42
问题 Right now I am using this: function is_retina_device() { return window.devicePixelRatio > 1; } But it\'s simplicity scares me. Is there is a more thorough check? 回答1: According to everything that I've read recently, browsers seem to be moving towards the resolution media query expression. This is instead of device-pixel-ratio that is being used in the currently accepted answer. The reason why device-pixel-ratio should only be used as a fallback is because it is not a standard media query.

How to simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display?

元气小坏坏 提交于 2019-11-26 08:39:51
问题 How can you simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display? 回答1: Search for, download, and install Apple's free Additional Tools for Xcode 8 (for previous Xcode releases search for Graphics Tools for Xcode according to your version). Note: free Apple Developer account required. Launch Quartz Debug application. Go to menu: Window ---> UI Resolution . Check Enable HiDPI display modes . Quit Quartz Debug . Open System Preferences . Select Displays

How to support both iPad and iPhone retina graphics in universal apps

我与影子孤独终老i 提交于 2019-11-26 05:55:22
问题 Apple presented new iPad that support retina graphics. I saw this link retina graphic in apple apps. As you can see apple just use \"@2x\" suffix for retina iPad display. I have an universal app. So how to support retina in new iPad and iPhone? Will iPad retina use suffix \"@2x\" similar to iPad? 回答1: I just created a test app and tested. So for devices without retina: ImageName.png - For iPhone/iPod ImageName~ipad.png -- For iPad For devices with retina display: ImageName@2x.png - For iPhone

How to capture UIView to UIImage without loss of quality on retina display

两盒软妹~` 提交于 2019-11-25 21:57:42
问题 My code works fine for normal devices but creates blurry images on retina devices. Does anybody know a solution for my issue? + (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageContext(view.bounds.size); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage * img = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return img; } 回答1: Switch from use of UIGraphicsBeginImageContext to UIGraphicsBeginImageContextWithOptions (as documented on