![](/img/trans.png)
[英]How can I divide my table view data in sections alphabetically using Swift? (rewritten)
我有這種形式的數據源: 其他屬性在此階段將不起作用,因此讓我們保持簡單。 我將ViewController和TableViewDataSource分為兩個單獨的文件。 這是數據源代碼: class CountryDataSource: NSObject, UITableView ...
[英]How can I divide my table view data in sections alphabetically using Swift? (rewritten)
我有這種形式的數據源: 其他屬性在此階段將不起作用,因此讓我們保持簡單。 我將ViewController和TableViewDataSource分為兩個單獨的文件。 這是數據源代碼: class CountryDataSource: NSObject, UITableView ...
[英]Getting error "unrecognized selector sent to instance" while using UILocalizedIndexedCollation to create tableView section Indexes in Swift 4.2
我正在嘗試構建一個以 iPhone 的通訊錄應用為模型的應用。 在這個過程中,我試圖將部分索引放在我的聯系人 tableView 的右側。 Apple 的 doc Table View Programming Guide for iOS 建議使用 UILocalizedIndexedCollat ...
[英]unrecognized selector with UILocalizedIndexedCollation.current().section(for:collationStringSelector:#selector(getter: UIPreviewAction.title))
我在表視圖上與索引功能一起使用的這段代碼正在生成運行時錯誤: 錯誤發生在上面我的代碼的第二行。 錯誤提示: 2017-10-03 01:41:40.997296-0500 MailToText [6504:13026014]-[MailToText.TSS聯系人標題]:無法識 ...
[英]Swift 2.2 string literal selector
在更新之前,我的代碼工作正常: 但是現在,由於不再使用字符串文字選擇器,因此代碼中斷了。 我試圖將字符串文字選擇器更改為Selector(“ lastName”),但“索引”始終返回為-1。 而且我沒有任何解決方案。 此排序方法采用給定對象的屬性名稱。 而Person類確 ...
[英]How does `sectionForSectionIndexTitleAtIndex` on UILocalizedIndexCollation work? (Esp with custom section titles) It always returns the same number
在不同的地區這有區別嗎? 我完全不理解什么點sectionForSectionIndexTitleAtIndex方法上UILocalizedIndexCollation是。 我傳遞的每個索引都將返回相同的索引。 該文檔根本不是很有幫助,而且我似乎找不到任何實例,該實例返回的數字與我提供 ...
[英]Dynamic selector using UILocalizedIndexedCollation sectionForObject:collationStringSelector
使用UILocalizedIndexedCollation時,我需要動態設置選擇器。在我的應用中,我有以下代碼: mainTitle是myObject中許多屬性之一。 但是,我希望選擇器以任何字符串顯示。 我從該站點獲得了提示: UILocalizedIndexedCollat ...
[英]UILocalizedIndexedCollation UITableView Indexed List Sort
我正在創建帶有用戶聯系人列表的UITableView 。 我已成功導入聯系人列表,並將其存儲在數組中作為包含每個聯系人的姓,名和ID參考的字典。 我正在嘗試實現UITableView's索引列表功能。 嘗試將數組划分為表的索引UILocalizedIndexedCollation的不同 ...
[英]Is it possible to UILocalizedIndexedCollation with UICollectionView?
是否可以使用UICollectionView進行UILocalizedIndexedCollation? 我正在使用UICollectionView顯示數據,但我想使用UILocalizedIndexedCollation像iOS聯系人一樣。 我找不到辦法 ...
[英]how to sort Chinese character into # in UILocalizedIndexedCollation
我想知道如何將漢字排序為“#”而不是AZ。 任何意見,不勝感激。 ...
[英]simple mistake on the function
我想在表格視圖上顯示一個索引欄,其中所有歌曲均按字母順序排序,而#中的外語歌曲則與iOS中的iPod音樂一樣。 但是我得到了一個錯誤 任何評論都非常感謝,謝謝。 // viewDidLoad ...
[英]UILocalizedIndexedCollation locale different than English
我正在使用帶有UILocalizedIndexedCollation的Tableview在右側顯示索引,但是手機上的語言是瑞典語(svenska),因此我在AZ之后看到一些特定於瑞典語的特殊字符,例如åäö。 在AZ中,有些字符缺失,例如Q,X等,我相信在Sweidsh語言環境中不存在。 ...
[英]NSFetchedResultsController with indexed UITableViewController and UILocalizedIndexedCollation
我有一個使用NSFetchedResultsController的表。 這會給我一個帶有標題的索引 但我想使用UILocalizedIndexCollation來獲取完整的字母。 如何將這些方法連接到NSFetchedResultsController? 我想我需要從當 ...
[英]How to sort Address Book entries in iOS per section
我正在嘗試實現UILocalizedIndexCollection,如http://developer.apple.com/library/ios/#documentation/iPhone/Reference/UILocalizedIndexedCollation_Class/UILoca ...
[英]UILocalizedIndexedCollation for Japanese giving different ordering to contacts/music apps
UILocalizedIndexedCollation似乎在日本iOS設備上返回的結果與內置的Contacts / Music應用程序中的結果不同。 請注意,這不是關於日語在索引中根本不顯示的常見問題。 我正在獲取日語假名部分,但與聯系人等相比,索引的順序不正確。 這是屏幕 - ...
[英]Collation sort with object
我有一個列表視圖,想要對數組進行排序,以便每個名稱都在正確的UILocalizedIndexCollation部分下。 這是正在傳遞的部分的片段。我想通過name進行排序,但是我也想保持對象不變,以便可以使用其他數據。 划分 調用分區 我需要保持對象完整,但要按名稱排序 ...
[英]NSFetchedResultsController v.s. UILocalizedIndexedCollation
我正在嘗試使用具有混合語言數據的FRC並希望有一個節索引。 似乎從文檔中你應該能夠覆蓋FRC 然后使用UILocalizedIndexedCollation來獲得本地化的索引和節。 但遺憾的是,這不起作用,並不是打算使用的:( 有沒有人能夠使用帶有UILocalized ...