Questions tagged [uilocalizedcollation]
24 questions
1
vote
1 answer
UILocalizedIndexedCollation locale different than English
I am using Tableview with UILocalizedIndexedCollation to show the index on right side but the language on my phone is Swedish (svenska) hence I see some special characters specific to Swedish language like å ä ö after A-Z . In A-Z some of the…

user1060418
- 215
- 1
- 3
- 15
0
votes
1 answer
Collation sort with object
I have a list view and want to sort the array so that each of the names is under the correct UILocalizedIndexCollation section.
Here is a snippet of the section that is being passed in. I want to sort via the name however I also want to keep the…

Bot
- 11,868
- 11
- 75
- 131
0
votes
1 answer
How can I divide my table view data in sections alphabetically using Swift? (rewritten)
I have a data source in this form:
struct Country {
let name: String
}
The other properties won't come into play in this stage so let's keep it simple.
I have separated ViewController and TableViewDataSource in two separate files. Here is the…

NotationMaster
- 390
- 3
- 17
0
votes
1 answer
unrecognized selector with UILocalizedIndexedCollation.current().section(for:collationStringSelector:#selector(getter: UIPreviewAction.title))
This code I use with my indexing feature on a table view is generating a runtime error:
let collation = UILocalizedIndexedCollation.current()
sectionNumber = collation.section(for: tssContact, collationStringSelector: #selector(getter:…

daniel
- 1,446
- 3
- 29
- 65
0
votes
1 answer
How does `sectionForSectionIndexTitleAtIndex` on UILocalizedIndexCollation work? (Esp with custom section titles) It always returns the same number
Is this different in different locales? I'm completely failing to understand what the point of the sectionForSectionIndexTitleAtIndex method on UILocalizedIndexCollation is. Every index I pass just returns the identical index.
The documentation is…

Doug Smith
- 29,668
- 57
- 204
- 388
0
votes
1 answer
Dynamic selector using UILocalizedIndexedCollation sectionForObject:collationStringSelector
I need to set the selector dynamically when using UILocalizedIndexedCollation
In my app, I have the following code:
UILocalizedIndexedCollation *indexedCollation=[UILocalizedIndexedCollation currentCollation];
for (MyObject *theObject in…

Tom Tallak Solbu
- 559
- 6
- 20
0
votes
1 answer
Is it possible to UILocalizedIndexedCollation with UICollectionView?
Is it possible to UILocalizedIndexedCollation with a UICollectionView? I'm using UICollectionView to show data but I want to use UILocalizedIndexedCollation like iOS contacts with it. I didn't find a way to do it

Saleh Albuga
- 448
- 5
- 11
0
votes
1 answer
how to sort Chinese character into # in UILocalizedIndexedCollation
i'm wondering on how to sort Chinese character into "#" instead of A-Z.
any comments are greatly appreciated.
-(NSArray *)partitionObjects:(NSArray *)array collationStringSelector:(SEL)selector
{
self.collation = [UILocalizedIndexedCollation…

Desmond
- 5,001
- 14
- 56
- 115
0
votes
1 answer
simple mistake on the function
I would like to show an index bar on my tableview with all my songs sorted by alphabetical order and those foreign language songs in # just like how the iPod music in iOS do it.
However i gotten an error
*** Terminating app due to uncaught exception…

Desmond
- 5,001
- 14
- 56
- 115