rdelfin rdelfin - 15 days ago 5
iOS Question

Table Storage in Objective-C with cocoa touch

I am making a game that has a table (attack bonuses). What is the most efficient way of creating this table and be able to access it easily from the device (besides putting this info directly into the class)

Answer

XML is usually my weapon of choice for storing this kind of information:

<bonuses>
    <bonus name="nameOfBonus1" value="30"/>
    <bonus name="nameOfBonus2" value="12"/>
</bonuses>

You can then use NSXMLParser to parse the information from the XML file.

Comments