【发布时间】:2011-09-08 06:55:50
【问题描述】:
我在表格视图中有一个自定义单元格,见下文。
我的自定义单元格中有两个文本字段 txt1 和 txt2,如下所示
如何访问我在每个文本字段中输入的值,以便将值添加到单独的数组中...
“Addset”按钮将通过增加一个集合来增加分组表视图的部分数。
我的表格视图代码如下。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellID= @"catogoryCell";
CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:cellID];
if(cell==nil)
{
NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil];
for(id currentObject in nibObjects)
{
if([currentObject isKindOfClass: [CustomCell class]])
{
cell = (CustomCell *)currentObject;
}
}
}
//cell.txt1.text = @"0";
return cell;
}
谢谢大家..
【问题讨论】:
标签: iphone ios uitextfield