久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='MeBZG'></tfoot>
  1. <i id='MeBZG'><tr id='MeBZG'><dt id='MeBZG'><q id='MeBZG'><span id='MeBZG'><b id='MeBZG'><form id='MeBZG'><ins id='MeBZG'></ins><ul id='MeBZG'></ul><sub id='MeBZG'></sub></form><legend id='MeBZG'></legend><bdo id='MeBZG'><pre id='MeBZG'><center id='MeBZG'></center></pre></bdo></b><th id='MeBZG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MeBZG'><tfoot id='MeBZG'></tfoot><dl id='MeBZG'><fieldset id='MeBZG'></fieldset></dl></div>
    • <bdo id='MeBZG'></bdo><ul id='MeBZG'></ul>

  2. <legend id='MeBZG'><style id='MeBZG'><dir id='MeBZG'><q id='MeBZG'></q></dir></style></legend>

      <small id='MeBZG'></small><noframes id='MeBZG'>

    1. 使用 UITableView 和 NSOrderedSet 對核心數據進行排序

      Core Data ordering with a UITableView and NSOrderedSet(使用 UITableView 和 NSOrderedSet 對核心數據進行排序)
      • <bdo id='1XV6H'></bdo><ul id='1XV6H'></ul>
        • <tfoot id='1XV6H'></tfoot>

            <tbody id='1XV6H'></tbody>

          1. <i id='1XV6H'><tr id='1XV6H'><dt id='1XV6H'><q id='1XV6H'><span id='1XV6H'><b id='1XV6H'><form id='1XV6H'><ins id='1XV6H'></ins><ul id='1XV6H'></ul><sub id='1XV6H'></sub></form><legend id='1XV6H'></legend><bdo id='1XV6H'><pre id='1XV6H'><center id='1XV6H'></center></pre></bdo></b><th id='1XV6H'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1XV6H'><tfoot id='1XV6H'></tfoot><dl id='1XV6H'><fieldset id='1XV6H'></fieldset></dl></div>

            • <small id='1XV6H'></small><noframes id='1XV6H'>

                <legend id='1XV6H'><style id='1XV6H'><dir id='1XV6H'><q id='1XV6H'></q></dir></style></legend>

                本文介紹了使用 UITableView 和 NSOrderedSet 對核心數據進行排序的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                在使用 Core Data 作為后備存儲的 UITableViewController 中實現用戶定義的排序需要執行哪些步驟?

                What are the steps that I need to perform to implement user-defined ordering in a UITableViewController with Core Data as the backing store?

                我還需要響應 -tableView:moveRowAtIndexPath:fromIndexPath:toIndexPath: 還是模型重新排序由表視圖自動處理?我可以只選中 Core Data 模型文件中的Ordered"復選框并期望它將更改從 table view 傳輸到 store,還是我必須做更多?我是否必須更改 fetchedResultsController 獲取其對象的方式(例如添加排序描述符)?

                Do I still need to respond to -tableView:moveRowAtIndexPath:fromIndexPath:toIndexPath: or is the model re-ordering handled automatically by the table view? Can I just check the "Ordered" checkbox in the Core Data model file and expect it to transmit the changes from the table view to the store, or do I have to do more? Do I have to change the way my fetchedResultsController gets it's objects (e.g. add a sort descriptor)?

                推薦答案

                你不需要放棄 NSFetchedResultsController 或 NSOrderedSet.如果您堅持使用 NSOrderedSet,那么簡單的方法就是向您的對象 NSManagedObject 子類添加一個方法.因此,例如,如果您有一個包含有序章節集的對象 Book,您可以向章節對象添加一個方法:

                You don't need to abandon NSFetchedResultsController or NSOrderedSet. If you stick with NSOrderedSet, the easy way is to just add a method to your objects NSManagedObject subclass. So for instance, if you have an object Book with an ordered set of Chapters, you can add a method to the Chapters object:

                - (NSUInteger)indexInBookChapters
                {
                    NSUInteger index = [self.book.chapters indexOfObject:self];
                    return index;
                }
                

                提示:將此添加到一個類別中,這樣它就不會被 CoreData 自動生成的代碼覆蓋.

                Tip: Add this to a category so it doesn't get overwritten by CoreData auto generated code.

                然后你可以在你的 NSFetchedResultsController 的排序描述符中使用這個方法:

                Then you can use this method in your sort descriptor for your NSFetchedResultsController:

                fetchRequest.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"indexInBookChapters" ascending:YES]];
                

                這篇關于使用 UITableView 和 NSOrderedSet 對核心數據進行排序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                To stop segue and show alert(停止 segue 并顯示警報)
                iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                Icon already includes gloss effects(圖標已經包含光澤效果)
                How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))

                    <tbody id='ROrOp'></tbody>
                    • <small id='ROrOp'></small><noframes id='ROrOp'>

                      <tfoot id='ROrOp'></tfoot>

                      <i id='ROrOp'><tr id='ROrOp'><dt id='ROrOp'><q id='ROrOp'><span id='ROrOp'><b id='ROrOp'><form id='ROrOp'><ins id='ROrOp'></ins><ul id='ROrOp'></ul><sub id='ROrOp'></sub></form><legend id='ROrOp'></legend><bdo id='ROrOp'><pre id='ROrOp'><center id='ROrOp'></center></pre></bdo></b><th id='ROrOp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ROrOp'><tfoot id='ROrOp'></tfoot><dl id='ROrOp'><fieldset id='ROrOp'></fieldset></dl></div>
                        <bdo id='ROrOp'></bdo><ul id='ROrOp'></ul>

                          <legend id='ROrOp'><style id='ROrOp'><dir id='ROrOp'><q id='ROrOp'></q></dir></style></legend>

                          主站蜘蛛池模板: 黄色av网站免费看 | 精品自拍视频在线观看 | 天堂av中文| 国产精品九九视频 | 艹逼网 | 国产高清在线 | 在线视频亚洲 | 久久国产亚洲 | 国产不卡一 | 国产精品国产a级 | 久久久久国产一区二区三区 | 成人在线免费视频 | 成年女人免费v片 | 免费在线观看av网站 | av电影一区 | 久久精品视频免费看 | 欧美一区二区二区 | 伊人久久麻豆 | 日日夜夜操天天干 | 国产99热 | 日本韩国欧美在线观看 | 一区二区三区在线电影 | 午夜小视频免费观看 | 亚洲国产一区二区三区 | 欧州一区二区三区 | 成人做爰69片免费观看 | 一级毛片免费视频 | 在线视频h| 高清黄色 | 精品成人在线视频 | av资源在线看 | 九一精品 | 久久久久久免费看 | 免费观看的av毛片的网站 | 亚洲精品日韩在线观看 | 黄色片网此 | 精品综合久久 | 亚洲精品电影在线观看 | 国产精品一区视频 | 欧美美女一区二区 | 亚洲欧美一区二区三区1000 |