菜鸟请教cell设计问题
cell分成两列显示,第一列是titlelabel,第二列是两列多行的detaillabel(这个label的行数根据array中保存的数量来定)
textvalue是一个nsstring:物品名称,申领数量;计算器,0;
最后显示是在titlelabel中老是多显示():(一对括号加一个冒号),不知道是为什么,请大侠指导,非常感谢。
UILabel *titleLabel = (UILabel *)[cell.contentView viewWithTag:kTagTitleLabel];
titleLabel.text = @"物品详情";
if (textValue != nil) {
NSUInteger textLength = [textValue length];
while( [textValue length] != 0) {
NSMutableDictionary *textDic = [[NSMutableDictionary alloc] initWithCapacity:10];
NSInteger locoal = [textValue rangeOfString:@","].location;
NSString *name = [textValue substringToIndex:locoal];
[textDic setObject:name forKey:@"name"];
NSString *temp = [textValue substringFromIndex:locoal+1];
textValue = temp;
textLength = [textValue length];
locoal = [textValue rangeOfString:@";"].location;
NSString *value = [textValue substringToIndex:locoal];
[textDic setObject:value forKey:@"value"];
temp = [textValue substringFromIndex:locoal+1];
textValue = temp;
NSLog(@"textvalue length = %d", [textValue length]);
[textArray addObject:textDic];
[textDic release];
}
for (NSUInteger i = 0; i < [textArray count]; i++) {
NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithCapacity:10];
//get value from text array
dic = [textArray objectAtIndex:i];
NSString *name = [dic objectForKey:@"name"];
NSString *value =[dic objectForKey:@"value"];
UILabel *detailLabel1 = (UILabel *)[cell.contentView viewWithTag:(kTagLastRowLineView+(i*2+1))];
UILabel *detailLabel2 = (UILabel *)[cell.contentView viewWithTag:(kTagLastRowLineView+(i*2+2))];
detailLabel1.text = name;
detailLabel2.text = value;
}
}
textvalue是一个nsstring:物品名称,申领数量;计算器,0;
最后显示是在titlelabel中老是多显示():(一对括号加一个冒号),不知道是为什么,请大侠指导,非常感谢。
UILabel *titleLabel = (UILabel *)[cell.contentView viewWithTag:kTagTitleLabel];
titleLabel.text = @"物品详情";
if (textValue != nil) {
NSUInteger textLength = [textValue length];
while( [textValue length] != 0) {
NSMutableDictionary *textDic = [[NSMutableDictionary alloc] initWithCapacity:10];
NSInteger locoal = [textValue rangeOfString:@","].location;
NSString *name = [textValue substringToIndex:locoal];
[textDic setObject:name forKey:@"name"];
NSString *temp = [textValue substringFromIndex:locoal+1];
textValue = temp;
textLength = [textValue length];
locoal = [textValue rangeOfString:@";"].location;
NSString *value = [textValue substringToIndex:locoal];
[textDic setObject:value forKey:@"value"];
temp = [textValue substringFromIndex:locoal+1];
textValue = temp;
NSLog(@"textvalue length = %d", [textValue length]);
[textArray addObject:textDic];
[textDic release];
}
for (NSUInteger i = 0; i < [textArray count]; i++) {
NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithCapacity:10];
//get value from text array
dic = [textArray objectAtIndex:i];
NSString *name = [dic objectForKey:@"name"];
NSString *value =[dic objectForKey:@"value"];
UILabel *detailLabel1 = (UILabel *)[cell.contentView viewWithTag:(kTagLastRowLineView+(i*2+1))];
UILabel *detailLabel2 = (UILabel *)[cell.contentView viewWithTag:(kTagLastRowLineView+(i*2+2))];
detailLabel1.text = name;
detailLabel2.text = value;
}
}
...全文
相关推荐
ios-点击加载隐藏cell 并且滑动cell置顶.zip
半年ios 学习的菜鸟 制作滑动cell置顶(用了一个比较鸡贼的办法,想知道的可以看层级视图)点击cell 选择隐藏cell的下拉框 但是没有解决cell上button的复用问题,哪位大神会的帮忙修改
ios-点击加载隐藏cell 并且滑动cell置顶 1.1版本.zip
半年ios 学习的菜鸟 制作滑动cell置顶(用了一个比较鸡贼的办法,想知道的可以看层级视图)点击cell 选择隐藏cell的下拉框更新了button复用的问题,但是上拉置顶的点击同步。暂时未做,看层
菜鸟谈VBA最最基础入门
Worksheet 的 Change 事件Worksheet 的 Change 事件是指 Worksheet 中的改变事件,例如 Cell 的值改变、 Selection 的改变等。
LTEKPI指标详解菜鸟零基础提升篇.pdf
LTE KPI 指标详解菜鸟零基础提升篇LTE KPI 指标是衡量 LTE 网络性能的重要指标,对于运营商和网络管理员而言,了解 LTE KPI 指标对 network performance analysis
LTE-KPI指标详解菜鸟零基础提升篇.doc编程资料
"LTE-KPI指标详解菜鸟零基础提升篇"在LTE(Long-Term Evolution)网络中,Key Performance Indicators(KPIs)是评估网络性能的关键参数。这篇文


