M
M
MagoVinch2014-01-22 11:44:03
Objective-C
MagoVinch, 2014-01-22 11:44:03

How can NSIntegers be written to a file?

There is an array Y, it contains objects X's with a field @property(nonatomic, assign) NSInteger *num;
, you need to selectively save these nums to a file so that you can load them into another array when loading the program!
How to do it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
gooddy, 2014-01-22
@MagoVinch

1. through NSNumber drive into NSArray and save it to plist file
2. ... - convert to JSON and save to file

E
Egor Tolstoy, 2014-01-22
@YourDestiny

Try using NSCoding - here's a great tutorial.

A
Alexey Storozhev, 2014-01-26
@storoj

I hope NSInteger *numthis is a typo

M
Mr_Kibernetik, 2014-01-22
@Mr_Kibernetik

Convert to numbers of the required type (int, double) and save.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question