view's alpha in IOS5 is different? - ios5

I have a UITextView.
The view's alpha is 0.2.
The text color is white.
It looks normal in simulator4.3 and device(IOS4.2.1)
But it looks too transparent in device(IOS 5).
It feels like the alpha is 0.1 or even less.
Why? Is the alpha's algorithm in IOS5 updated?

I just solve this question. The reseaon is that i set the textcolor's alpha in accident,but in IOS4 the textcolor's alpha is not work. so i also set the view's alpha to do it. so in IOS4(in IOS4 the textcolor's alpha is not work),the text looks normal. But in IOS5(IOS5 support the textcolor's alpha) the text's alpha is textcolor'alpha*view's alpha.....

No.
What kind of device is the 4.2.1 v. the iOS 5? The screens on the iPhone 4 and 4s are much crisper looking and could cause this appearance.

Related

How can I remove the glossy effect on a UITabbar?

I don't want the glossy selection that is on a standard UITabBar. Is there a way to remove the shine, and possibly add background texture instead of the black?
If your application is to be released on iOS 5, with no backward compatibility needed; goto to http://developer.apple.com and have a look, something on the iOS 5 beta pages might peek your interest :).
Otherwise you need to subclass UITabBar or make an equivalent replacement that draws using your custom needs.

iPhone 4 adding yellow to stripes to an element

I have an issue with iPhone 4 adding some yellow stripes to an element with a white to grey gradient.
I have attached an image to show what it renders like on the iPhone.
It's not happening on previous versions of the iPhone or android phones.
Does anyone have any idea's as to why this might be happening?
what are the dimensions of the image? I ran across a similair issue before, and I had to play with the image width a bit to get it to scale properly.
I fixed my issue using this: Alpha transparent PNGs not displaying correctly in Mobile Safari
Hope it fixes your issue too!

iPhone UIDatePicker Gradient - What are the colors?

I'm putting in a UIDatePicker in a UIView and I can see that the UIDatePicker has a border that is some kind of a dark color on the bottom and it gets lighter as you get higher. I want the containing UIView to use the same colors so that the UIDatePicker flows with the rest of the view and doesn't stand out.
I can put in a gradient in the containing view, but I don't know what colors to use! If anyone could suggest them, I'd appreciate it.
mj
Light Color (Top): RGB: 145,146,154
Dark Color (Bottom): RGB: 30,31,44
Use Digital Color Meter that is built-in to OS X (in the Utilities folder).
The colours displayed in Xcode don't always match those when the app is viewed on an actual iOS device, especially for UIDatePicker object.
What I've found useful is the following:
Run the app on an iOS device with your objects on screen
Take a screenshot (hold down the home button and the power button together)
Email that screenshot to your Mac
Use the OS X Digital Color Meter on the screenshot to get accurate RGB values
Remember to check both retina and non retina devices for colour matching.

iPad running iPhone apps and font scaling

I'm testing one of my iPhone apps on my iPad in "2x" mode, so it stretches everything to double-size. I've noticed that some text appears to be smoother than others. From my (limited) testing, text in a UITextView or UITextField that is being edited (has keyboard focus) is smoother than a plain UILabel hanging out in a view. I'm not sure if it's anti-aliasing in 2x2 pixel blocks still, or just that it uses all the pixels to draw the letters rather than treating them as 2x2 pixel blocks, or something else entirely. From my testing, this appears to be true regardless of font size.
Does anyone know what is going on here?
And, more importantly, is there a way to control this? It looks much better and I'd like to have my plain UILabels drawn this way too! I'm hoping that a future iOS update will allow the iPad to use iPhone 4 "#2x" resources and font drawing when running an iPhone app in 2x mode, that would make them look much better!
Thanks!
iPad's legacy scaling mode obeys CALayer's magnificationFilter property. Use kCAFilterLinear for smoothed/blurry upscaling, and kCAFilterNearest for blocky/crisp upscaling.
Also, if you set the contents property to be a CGImage that is double-sized, QuartzCore will gladly take advantage of the extra resolution.

Stop UIImageView scaling up on iPhone 4

I would like to stop a UIImageView from upscaling as it looks terrible. Unfortunately, I cannot control the UIImage content it is holding, so need to force it not to attempt the upscale on an iPhone 4 retina display.
What's the best advice here?
Set its frame manually, I think.
Unless you are always using 2x images (for retina display), then you can multiply the width/height with 0.5.