Solved

How do I make a master detail template into a catalog?

Posted on 2012-03-11
3
40 Views
Last Modified: 2016-05-25
The app: I need to make an iPad app for cashiers at a small school uniform business to ring up customers.  Using the master detail view template, The schools are listed in the master view.  Depending on which school is selected, the available uniforms in detail view should change to the one's for that specific school.  Also, these uniforms should have a cost associated with them and a way to select quantity so they can be totaled up after being added to the cart.

Quick description of what I have so far:  So far, I have it so the app has different school in the master view.  I am having a hard time making it populate with different uniforms when one of the schools is selected.
0
Comment
Question by:nickd91
3 Comments
 
LVL 20

Accepted Solution

by:
darbid73 earned 500 total points
ID: 37708415
Hi nickd91,

I assume you have a master view  that contains a UITableView.  One of your delegate methods referenced in the Apple documents is "tableView:didSelectRowAtIndexPath:".  This you will need to implement this method.

Now if you only have a list of schools and each school only has one uniform then each time the person selects a school then the above method will run.  

Then what you need to do is create a way of passing the choice to the class of your detail view.  This means that you need your master view to have access to the instance of your detail view controller and then to have a custom method in your detail view controller that accepts your school choice.

There are a number of ways of passing this information between your master view and detail view.  Here is one example using a protocol & delegate.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What's a UDID? If you're involved in developing, testing, or even reviewing an iOS application that's in beta, then at some point you may need to know the UDID for any iOS devices that you'll be testing on. What's the UDID? It stands for Unique Dev…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question