开发者

Core Data with UISplitViewController best practice and Prev/Next Button?

开发者 https://www.devze.com 2023-03-24 23:05 出处:网络
I need to display the following data structure in Core Data on iPad: Categories(tableView) -> Products(tableView) (This part with 2 layers of navigation controllers in masterView on the left side of

I need to display the following data structure in Core Data on iPad:

Categories(tableView) -> Products(tableView) (This part with 2 layers of navigation controllers in masterView on the left side of UISplitViewController)

With a particular product selected, display ProductDetail in the detailView on the right side of UISplitViewController.

The challenge is to add Prev/Next buttons in the detailView and navigate through different products within that particular category. Including functions where in portrait mode:

1.when masterView disappears, the Prev/Next are still able to function properly.

2.Say if user currently is at Category1->ProductList1, user navigate back from ProductList1->Categories, did not select any other category, dismisses materViewPopOver. After using Prev/Next to navigate between products in ProductList1, then reopen the masterViewPopOver, original ProductList1 开发者_开发问答is shown in masterViewPopOver (instead of at Categories level when last dismissed)

Bottom line is, I want it to function exactly like the native iPad Mail app.

Can any one advice what is the bet practice to achieve this behavior?

Should I use only one FetchedResultsController (with many sections) to handle both Categories level and Products level data? Or should I use two (one for each level)? How do I make sure detailView keeps track of the Prev/Next order?

Any input is appreciated! Thanks in advance.

0

精彩评论

暂无评论...
验证码 换一张
取 消