retina-display

Stop using retina-only images

谁说胖子不能爱 提交于 2019-12-04 17:48:17
问题 What will happen if I do the following: I substitute all non-retina assets with the retina assets I delete all retina assets in my project ( All the ...@2x.png s etc.) Why do I want to do this: There will be less and less non-retina iPhones in the future (also due to minimal OS requirements etc.) I get a lighter binary I don't have so many "quasi-duplicate" files in my project which I have to maintain separately. Now: Will the iPhone 3GS scale down the image and display it properly (with a

Possible Retina issue with OpenGL ES on iPhone?

社会主义新天地 提交于 2019-12-04 15:42:50
This is probably linked to another unsolved mystery of mine. I'm drawing Orthographic 2d on iPhone, using real device and simulator. I'm trying to color my pixels a given color depending on how far they are from arbitrary point in pixelspace of 'A', which I pass in (hard code). I'm doing everything in Retina 960x640 resolution. I calculate distance from A to gl_FragCoord , and I color based on leaping between 2 colors with the 'max' being 300px distance. When on simulator (with retina display) I need to give a center point of "460" pixels for screen midpoint X.. Y I give 160px, and I look for

Texts are blurry when I migrated Android Studio to a higher resolution display

非 Y 不嫁゛ 提交于 2019-12-04 13:19:53
is there any way I can change the resolution of Android Studio? recently I migrate my Android Studio from rMBP 13' to rMBP 15' and the text is blurry. I tried to change its resolution hoping to fix it but found no way to do. do you guys met with this before? There's a known issue with IntelliJ and Android Studio on MacOS that only Apple's JDK does proper subpixel antialiasing in its rendering. If you're using an Oracle JDK, then the rendering is not as good. Unfortunately, this means that the only Java version with good rendering is 1.6; Oracle picked up MacOS support for JDK 1.7 and 1.8. The

Why is [[UIScale mainScreen] scale] 1 on an iPad 3 with Xcode 4.2?

懵懂的女人 提交于 2019-12-04 08:49:22
When testing on my iPad 3, [[UIScreen mainScreen] scale] == 1.0 My understanding is that this should be 2.0. I am using the iOS 5.1 SDK with Xcode 4.2 on Snow Leopard, which I understand is not an "officially supported" configuration. However, I can't imagine why that would affect what is happening purely on the device. (I can imagine all sorts of ways it would break the simulator.) Before XCode version 4.3, [UIScreen scale] will return 1.0 for an iPad 3. Updating to 4.3 will enable the correct value of 2.0 being returned. That's because the screen is not scaled. You can get the ratio like

How do I change a partially transparent image's color in iOS?

一世执手 提交于 2019-12-04 08:05:29
问题 I have a single-color image that has partial transparency. I have both normal and @2X versions of the image. I would like to be able to tint the image a different color, in code. The code below works fine for the normal image, but the @2X ends up with artifacts. The normal image might have a similar issue If so, I can't detect it on account of resolution. +(UIImage *) newImageFromMaskImage:(UIImage *)mask inColor:(UIColor *) color { CGImageRef maskImage = mask.CGImage; CGFloat width = mask

How to detect the Retina Display in MonoTouch

試著忘記壹切 提交于 2019-12-04 06:54:46
Just that question I want to detect the retina display in my MonoTouch app. Thanks. poupou There are already answers for ObjectiveC but here's a C# version: bool retina = (UIScreen.MainScreen.Scale > 1.0); That will work for the newer iPhone and iPod Touch and I suspect (will know in less than two weeks) for the new iPad. Jason's approach will work too and can be attractive if you need to know several hardware related features (e.g. retina + camera). 来源: https://stackoverflow.com/questions/9611784/how-to-detect-the-retina-display-in-monotouch

iPhone - adapt images to retina display

不打扰是莪最后的温柔 提交于 2019-12-04 06:29:45
I have a question about updating my app's graphics for the retina display of the iPhone 4. I am keeping each view's resolution to 480 x 320 Points. So I was wondering: suppose I have a 100 x 50 UIImageView. It's better for my actual image I am going to load to be 200 x 100 pixels @ 163 ppi or 100 x 50 pixels @ 326 ppi? Is it the same thing in terms of 'lightness'? which is the preferred way? Thanks, you're awesome Lorenzo 1) Define your UIImageView to be 100 x 50 pixels as you describe it above. 2) Have one image file that is 100x50 pixels "MyImage", and a second image file that is 200x100

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?

自古美人都是妖i 提交于 2019-12-04 03:22:36
On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing something in the .plist file or something? BTW I am hand coding the GUI, so there is no XIB. Unless your app includes a Default-568h.png in it's bundle, it will run inside a 480 point high legacy screen sandbox on the iPhone 5, and can't draw or see any dimensions outside that sandbox. Note that including this Default-568h.png is only allowed when building an app using Xcode 4.5 and the iOS 6 SDK

html5 canvas game - how to add retina support

巧了我就是萌 提交于 2019-12-04 02:21:40
I'm creating an HTML5 canvas game for iPhone. I would like to support both retina and non-retina displays. My question is, how do I support both retina and non-retina displays? I.E., what is the general implementation for doing this? Do I write the game using the iPhone dimension and then add retina support? Or do I create the game retina size and add non-retina support? Is it best to have two images, one retina one non-retina? or just scale the retina image down? Do I have separate canvas sizes for retina and non-retina? Do I need to scale the mouse input? Basically, I have no idea on the

Is this possible to simulate an retina display OS X on non retina display Mac?

梦想的初衷 提交于 2019-12-03 20:47:18
I am using an iMac to do OS X App Development, but my iMac is not a retina display. Is this possible to let me simulate the result on retina display Mac? Thanks. I used Quartz Debug to get a HiDPI entry in Displays. This was pre-Mavericks, so I'm not sure if that's still the recommended way to do it. The answers here mention a couple different ways . You may also need to hold Option while clicking on "Scaled" in Displays . 来源: https://stackoverflow.com/questions/30872623/is-this-possible-to-simulate-an-retina-display-os-x-on-non-retina-display-mac