开发者

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 v开发者_如何学Goiew, 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:

  1. Run the app on an iOS device with your objects on screen
  2. Take a screenshot (hold down the home button and the power button together)
  3. Email that screenshot to your Mac
  4. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜