ios - Sort by string and ignore number for display in UITableView -


i need sort alphabetic data in table view , ignore numbers, :

- 123 test - 939 urne - 403 vase 

currently, data loaded this:

- 939 urne - 123 test - 403 vase 

what's best choice ignoring numbers?

you can store data separately in dictionaries, like,

array (    {         "number" = 403       "text"   = "vase"    },    {         "number" = 403       "text"   = "vase"    } ) 

then can sort using,

nssortdescriptor * descriptor = [nssortdescriptor sortdescriptorwithkey:@"text" ascending:yes]; [array sortusingdescriptors:[nsarray arraywithobject:descriptor]]; 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -