• <legend id='cv1MW'><style id='cv1MW'><dir id='cv1MW'><q id='cv1MW'></q></dir></style></legend>

      • <bdo id='cv1MW'></bdo><ul id='cv1MW'></ul>
      <tfoot id='cv1MW'></tfoot>

      <small id='cv1MW'></small><noframes id='cv1MW'>

      <i id='cv1MW'><tr id='cv1MW'><dt id='cv1MW'><q id='cv1MW'><span id='cv1MW'><b id='cv1MW'><form id='cv1MW'><ins id='cv1MW'></ins><ul id='cv1MW'></ul><sub id='cv1MW'></sub></form><legend id='cv1MW'></legend><bdo id='cv1MW'><pre id='cv1MW'><center id='cv1MW'></center></pre></bdo></b><th id='cv1MW'></th></span></q></dt></tr></i><div id='cv1MW'><tfoot id='cv1MW'></tfoot><dl id='cv1MW'><fieldset id='cv1MW'></fieldset></dl></div>
      1. 使用 [UIColor colorWithRed:green:blue:alpha:] 不适用于 UITableView

        Using [UIColor colorWithRed:green:blue:alpha:] doesn#39;t work with UITableView seperatorColor?(使用 [UIColor colorWithRed:green:blue:alpha:] 不适用于 UITableView 分隔符颜色?)

        <tfoot id='FFqrX'></tfoot>

        <i id='FFqrX'><tr id='FFqrX'><dt id='FFqrX'><q id='FFqrX'><span id='FFqrX'><b id='FFqrX'><form id='FFqrX'><ins id='FFqrX'></ins><ul id='FFqrX'></ul><sub id='FFqrX'></sub></form><legend id='FFqrX'></legend><bdo id='FFqrX'><pre id='FFqrX'><center id='FFqrX'></center></pre></bdo></b><th id='FFqrX'></th></span></q></dt></tr></i><div id='FFqrX'><tfoot id='FFqrX'></tfoot><dl id='FFqrX'><fieldset id='FFqrX'></fieldset></dl></div>

            <bdo id='FFqrX'></bdo><ul id='FFqrX'></ul>

                <small id='FFqrX'></small><noframes id='FFqrX'>

                <legend id='FFqrX'><style id='FFqrX'><dir id='FFqrX'><q id='FFqrX'></q></dir></style></legend>

                    <tbody id='FFqrX'></tbody>
                  本文介绍了使用 [UIColor colorWithRed:green:blue:alpha:] 不适用于 UITableView 分隔符颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试配置深灰色分隔符颜色.为什么以下什么都不做?

                  I'm trying to configure a dark gray seperator color. Why does the following do nothing?

                  self.tableView.seperatorStyle = UITableViewCellSeperatorStyleSingleLine;
                  self.tableView.seperatorColor = [UIColor colorWithRed: 127 green:127 blue:127 alpha:1];
                  

                  返回一个完全没有分隔符的表.

                  returns a table with no seperators at all.

                  只要我使用 [UIColor blackColor],我就可以得到分隔符.有什么关系?

                  As soon as I use [UIColor blackColor] then I get seperators just fine. What's the deal?

                  推荐答案

                  需要除以255.0

                  因为我几乎不使用介于 1.0 和 0.0 之间的值,所以我创建了一个非常简单的 UIColor 类别,它自己完成看起来凌乱的划分:(来自 http://github.com/Jon889/JPGeneral)

                  Because I hardly ever use values between 1.0 and 0.0, I created a very simple UIColor category that does the messy looking division by itself: (from http://github.com/Jon889/JPGeneral)

                  //.h file
                  @interface UIColor (JPExtras)
                  + (UIColor *)colorWithR:(CGFloat)red G:(CGFloat)green B:(CGFloat)blue A:(CGFloat)alpha;
                  @end
                  
                  //.m file
                  @implementation UIColor (JPExtras)
                  + (UIColor *)colorWithR:(CGFloat)red G:(CGFloat)green B:(CGFloat)blue A:(CGFloat)alpha {
                      return [UIColor colorWithRed:(red/255.0) green:(green/255.0) blue:(blue/255.0) alpha:alpha];
                  }
                  @end
                  

                  所以你可以这样做(如果你导入我上面链接的类别):

                  So you can just do(If you import the category I linked to above):

                  [UIColor colorWithR:127 G:127: B:127 A:1];
                  

                  这篇关于使用 [UIColor colorWithRed:green:blue:alpha:] 不适用于 UITableView 分隔符颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                  [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
                  <tfoot id='2x7op'></tfoot>
                  • <bdo id='2x7op'></bdo><ul id='2x7op'></ul>
                      <legend id='2x7op'><style id='2x7op'><dir id='2x7op'><q id='2x7op'></q></dir></style></legend>

                        <small id='2x7op'></small><noframes id='2x7op'>

                          • <i id='2x7op'><tr id='2x7op'><dt id='2x7op'><q id='2x7op'><span id='2x7op'><b id='2x7op'><form id='2x7op'><ins id='2x7op'></ins><ul id='2x7op'></ul><sub id='2x7op'></sub></form><legend id='2x7op'></legend><bdo id='2x7op'><pre id='2x7op'><center id='2x7op'></center></pre></bdo></b><th id='2x7op'></th></span></q></dt></tr></i><div id='2x7op'><tfoot id='2x7op'></tfoot><dl id='2x7op'><fieldset id='2x7op'></fieldset></dl></div>
                              <tbody id='2x7op'></tbody>