简体   繁体   English

iOS 5中的scrollviewTexturedBackgroundColor是否已更改?

[英]Has the scrollviewTexturedBackgroundColor changed in iOS 5?

I am trying to make a table have a twitter-like background color. 我正在尝试使表格具有类似Twitter的背景色。 Please see: http://cocoacontrols.com/posts/how-to-build-the-twitter-ipad-user-experience 请参阅: http : //cocoacontrols.com/posts/how-to-build-the-twitter-ipad-user-experience

All they do is they use the scrollView Texture background and increase the alpha to 0.8 or so. 他们所做的只是使用scrollView Texture背景并将alpha增大到0.8左右。 This darkens it from the default apple shade. 这会使它从默认的苹果色调变暗。 In my code, the following line of code works fine in iOS 4.3 and gives me a darker texture indeed. 在我的代码中,以下代码行在iOS 4.3中可以正常工作,并且确实为我提供了更暗的纹理。 Moving to iOS 5, however, it's no longer darker, or for some reason it's not possible for me to darken the texture to be quite as dark. 但是,移至iOS 5时,它不再变暗,或者由于某种原因,我无法将纹理变暗为同样暗。 Is this a known problem? 这是一个已知问题吗?

Thanks! 谢谢!

conversationTable.backgroundColor = 
  [[UIColor scrollViewTexturedBackgroundColor] colorWithAlphaComponent:0.5];

Try to change the background color of the underlaying view (perhaps the window) to black. 尝试将基础视图(也许是窗口)的背景颜色更改为黑色。 The default window background color is (now?) white and so your code will do exactly the opposite. 默认的窗口背景颜色是(现在?)白色,因此您的代码将执行相反的操作。

self.window.backgroundColor = [UIColor blackColor];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM