标签: cell

Xcode tableview字幕

我一直在寻找帮助,但没有运气:(

我想在TableViewCells中设置字幕.每个单元格中的字幕不能相同.我一直在写一些代码:

- (void)viewDidLoad
{
[super viewDidLoad];
 tableData = [[NSArray alloc] initWithObjects:@"cell 1", @"cell 2", nil];

}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{
return [tableData count];
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath        *)indexPath 
{
UITableViewCell *cell = nil;
cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell"];
if (cell == nil)
{ 
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle      reuseIdentifier:@"MyCell"];
}
cell.textLabel.text = [tableData objectAtIndex:indexPath.row]; 

cell.detailTextLabel.text = @"Subtitle 1", @"Subtitle 2", nil;

return cell;
}
Run Code Online (Sandbox Code Playgroud)

问题在于 cell.detailTextLabel.text = @"Subtitle 1", @"Subtitle 2", nil;

有人知道如何在每个单元格中设置不同的字幕吗?

祝好运!:)

xcode cell subtitle tableview

1
推荐指数
1
解决办法
1万
查看次数

Excel 单元格显示零而不是计算/引用值

我正在使用 Excel 文件作为源导出带有 Apache POI 的 Excel 文件,并且对于某些单元格(不是全部)仅引用其他单元格(例如='worksheet2'.B13)或使用引用的单元格(例如='worksheet2'.C13 + 'worksheet2'.D13)计算值,它们仅显示零 (0) 而不是正确的价值。

奇怪的是,当我单击公式并更改其中的某些内容时,例如键入一个空格并删除它然后键入 enter 时,会显示正确的值!

有关信息,这些单元格的类型是“数字/标准”。

我还在某处读到我应该在“Excel 选项”中检查“启用迭代计算”,但它对我不起作用。

预先感谢您的帮助

excel formula cell excel-formula apache-poi

1
推荐指数
1
解决办法
2万
查看次数

使用 Excel 中的“匹配”函数返回单元格地址

我有一个表格中的数字列表,我想搜索并带回该数字所在位置的单元格引用。例如,数据如下所示:

        A       B        C        D
1       1       2        3        4
Run Code Online (Sandbox Code Playgroud)

好的,结果不是很好,因为第一个是行号,然后下面的每个数字都位于每个字母下方,因此 C1 将包含 '3'....

如果我想在单元格中返回 C1 的参考号,我使用的是公式,=CELL("address",MATCH(AU14,C1:AG1))但这只是错误。我也尝试在其中放置一个索引,但我相信该索引只能垂直工作,因此会返回 #N/A 结果。

任何人都可以提供帮助,因为我已经浪费了太多时间!:)

excel reference formula cell match

1
推荐指数
1
解决办法
2万
查看次数

如何防止固定布局表格单元格中的断字?

我在表格上设置了 table-layout: fixed;,但每个单元格内的单词都被分成了新行。

Eg:

Applicatio
n

Instead of:

 Application
Run Code Online (Sandbox Code Playgroud)

我确实尝试了按照此处建议white-space: nowrap;添加但无济于事的解决方案

问题: 如何防止固定布局表格单元格中的断字?

表格布局:

             <table  id="escalation" class="table table-striped table-bordered" cellspacing="0">


                <thead>
                    <tr>
                        <th style="display:none">ID</th>
                        <th>RID</th>
                        <th>Asset Name</th>    
                    </tr>
                </thead>
                <tbody>

                        <tr>
                            <td>1</td>
                            <td class="td-limit">102345</td>
                            <td class="td-limit">Application Testing Break</td> 
                        </tr>

                </tbody>
            </table>
Run Code Online (Sandbox Code Playgroud)

CSS:

#escalation {

    table-layout: fixed;
}

#escalation th {
    overflow: auto;
    font-size: 10px;
    color: #000000;
    border-right: 1px solid #7591ac;
}
.td-limit {
    overflow: auto;
    font-size: 11px;
    max-width: 220px;
    overflow: hidden;
    word-wrap: break-word;
}
Run Code Online (Sandbox Code Playgroud)

html css cell word-break

1
推荐指数
1
解决办法
6301
查看次数

带有 td 的响应式表格,它们相互放在一起

我想让我的表响应式但我不知道如何使用媒体查询,有人可以帮助我吗?我的目标是让我的td行为像块一样,如果屏幕尺寸较小,则可以相互覆盖。

当前代码:

td{border:1px dotted red;background-color:red;color:white;}

p{font-family:'Varela Round';font-weight:bold;text-align:center;}
Run Code Online (Sandbox Code Playgroud)
<table width="100%" cellpadding="0" cellspacing="5">
  <tbody>
    <tr>
      <td><p>SOCIETES</p></td>
      <td><p>CONTACT</p></td>
      <td><p>EMAIL NOMINATIF</p></td>
      <td><p>OPT OUT</p></td>
      <td><p>LIGNES DIRECTES/MOBILES</p></td>
    </tr>
  </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

html-table cell media-queries responsive

1
推荐指数
1
解决办法
4758
查看次数

更改 tableView 中单元格的 editStyle 背景颜色和标签

我有一个表格视图,我试图在其中实现滑动删除操作。

我正在使用 swift 4 和 Xcode 9。

到目前为止,我有下一个代码,它允许我在滑动时显示删除标签:

func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
    switch editingStyle {
    case .delete:
        print("deleting row")

    default:
        return
    }
}
Run Code Online (Sandbox Code Playgroud)

到目前为止一切顺利,现在我想将背景红色更改为另一种颜色,如果可能的话我想显示一个图标而不是标签。

我正在尝试在 Swift 4 中看到的这段代码,但在创建按钮时它会抱怨:

func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
    let deleteButton = UITableViewRowAction(style: .default, title: "Delete") { (action, indexPath) in
        self.tableView.dataSource?.tableView!(self.tableView, commit: .delete, forRowAt: indexPath)
        return
    }
    deleteButton.backgroundColor = UIColor.black
    return [deleteButton]
}
Run Code Online (Sandbox Code Playgroud)

它给出了此错误 -> 对成员 'tableView(_:numberOfRowsInSection:)' 的引用不明确

我不知道我是否正在尝试编辑的好方法,或者它是否在 swift 4 上根本不可编辑。

任何帮助表示赞赏,

谢谢!

cell tableview swift swift4

1
推荐指数
1
解决办法
6942
查看次数

Excel 中的数据栏不准确

我已将数据栏添加到 Excel 中的某些百分比格式的单元格中。

在此输入图像描述

正如您所看到的,条形图并不能准确地代表百分比。例如,78% 条看起来像 99%。我尝试转到“条件格式”>“管理规则”,并将“最小值”更改为“百分比= 0/最大值=自动”,但这使条形失真更严重。我在这里做错了什么?

在此输入图像描述

excel conditional-formatting cell

1
推荐指数
1
解决办法
5666
查看次数

如何在SQL中编写Microsoft Excel"Shift Cells Up"功能

拿一个如下的简单表格:

Column Headings: || Agent's Name || Time Logged In || Center ||  
Row 1: Andrew  || 12:30 PM || Home Base  
Row 2: Jeff || 7:00 AM || Virtual Base  
Row 3: Ryan || 6:30 PM || Test Base
Run Code Online (Sandbox Code Playgroud)

现在让我们说删除一个单元格,这样表现在看起来像这样:

Column Headings: || Agent's Name || Time Logged In || Center ||  
Row 1: Andrew  || 12:30 PM ||   
Row 2: Jeff || 7:00 AM || Virtual Base  
Row 3: Ryan || 6:30 PM || Test Base
Run Code Online (Sandbox Code Playgroud)

请注意,缺少"Home Base".现在在Excel中,您可以删除单元格并移动其余部分,以便最终产品如下所示: …

sql t-sql excel cell

0
推荐指数
1
解决办法
858
查看次数

来自C++的Excel 2010自动化

有些人可以分享一个C++代码的工作示例,它执行以下操作:

  1. 连接到运行Excel(如果有),否则抛出异常,
  2. 连接到当前工作表,否则抛出异常,
  3. 从连接的工作表中读取至少一个单元格(如果有).

我希望有人之前做过类似的事情,并且愿意分享代码.我有严格的指示只使用C++,而Excel应该是2003/2007/2010.至于我在主机上的2010年,我将欣赏2010年的例子.

c++ excel automation cell

0
推荐指数
1
解决办法
4884
查看次数

如何在matlab中使用'if'语句?

我有一个大小为5x5的单元格数组,如下所示

 B= 00 10 11 10 11 
    01 01 01 01 11 
    10 00 01 00 01 
    10 10 01 01 11 
    10 10 10 00 10 
Run Code Online (Sandbox Code Playgroud)

和两个列向量

 S1= 21 
     23
     28 
     25 
     43 

 S2= 96 
     85 
     78 
     65 
     76 
Run Code Online (Sandbox Code Playgroud)

我想创建一个与B说5x5大小相同的新单元格数组,以满足以下条件

  Final={S1 if B{i}=11
         S1 if B{i}=10
         S2 if B{i}=01
         S2 if B{i}=00
Run Code Online (Sandbox Code Playgroud)

因此产生的输出将是这样的

  Z = s2 s1 s1 s1 s1   
      s2 s2 s2 s2 s1
      s1 s2 s2 s2 s2
      s1 s1 s2 s2 s1
      s1 s1 s1 s2 …
Run Code Online (Sandbox Code Playgroud)

matlab if-statement vector cell cell-array

0
推荐指数
1
解决办法
137
查看次数