I have a 600 item Collection view for which I implemented a quick access section Index.
The implementation uses the usual: indexTitles(for collectionView) and CollectionView(indexPathForIndexTitle: title: at:)
All is well, except that the collection titles are in a foreign language (latinized Coptic) and 3 of the 25 title glyphs are not in the SystemFont, so the index is drawn with these titles as question marks in boxes. The problem glyphs are "Ꜣ"(unicode A722), ""(A7E3), and "Ꜥ"(A725)
I drilled down on the subviews of the CollectionView and found I could access the index using:
let subviews = myCollectionView.subviews
if let indexView = subviews.first(where: {String(describing: type(of: $0))=="UIIndexBarAccessoryView"}) {
print(indexView)
}
Examining the contents of this UIIndexBarAccessoryView (which seems to be Private), it contains a _visualStyle property object which holds a _font.
How can I "legally" change the font for the indexBarAccessory to one that has the required glyphs? The rest of the App requires the local language to be English(US)