Reputation: 396
I am working with tag's for objects on the screen using viewWithTag()
which needs an Int
and also UITapGestureRecognizer
will provide the tag as an Int
. I am keeping track of the status of my objects in Core Data, but Core Data does not support Int (only Int16 - Int64). It's a pity now I have to convert all the time back and forward, but Ok so be it. My question is what is the best choice in Core Data for storing my Int? It is very unlikely it will surpass the 1000.
NB it gets even more funny: as I want to search the Core Data for my tag I have to search it as a string despite my type in Core Data is Int32
Upvotes: 0
Views: 755
Reputation: 603
If you expect it to be always less than 1000, use Int16 . With this, You can still store till 2^16 - 1
Upvotes: 1