Oop 在IOS 7中-如何组合plist的两个元素以创建一个将显示在tableview单元格中的元素-First Name+;LastName=FirstName LastName
如果我有一个plist:Oop 在IOS 7中-如何组合plist的两个元素以创建一个将显示在tableview单元格中的元素-First Name+;LastName=FirstName LastName,oop,ios7,uitableview,plist,Oop,Ios7,Uitableview,Plist,如果我有一个plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com /DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>FirstName<
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com /DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FirstName</key>
<array>
<string>Dave</string>
</array>
<key>LastName</key>
<array>
<string>Smith</string>
</array>
<key>Phone</key>
<array>
<string>(423) 555-7799</string>
</array>
<key>Email</key>
<array>
<string>email@gmail.com</string>
</array>
</dict>
</plist>
到这只百灵鸟
cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", [fname objectAtIndex:indexPath.row], [lname objectAtIndex:indexPath.row]];
并且它可以按预期工作强>
cell.detailTextLabel.text = [email objectAtIndex:indexPath.row];
return cell;
如果需要完整的.m文件,我可以添加它,我认为
cell.textlab.text=[NSString stringWithFormat:@“%@%@”,[fname objectAtIndex:indexath.row],[lname objectAtIndex:indexath.row]代码>?使用lname
lastnamesLarme数组-谢谢您。我以为我的答案是正确的,但它不起作用,你给了我我需要的信息。
cell.detailTextLabel.text = [email objectAtIndex:indexPath.row];
return cell;