Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oop 在IOS 7中-如何组合plist的两个元素以创建一个将显示在tableview单元格中的元素-First Name+;LastName=FirstName LastName_Oop_Ios7_Uitableview_Plist - Fatal编程技术网

Oop 在IOS 7中-如何组合plist的两个元素以创建一个将显示在tableview单元格中的元素-First Name+;LastName=FirstName LastName

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<

如果我有一个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</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;