Solved

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

Posted on 2012-03-11
3
34 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 19

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

CocoaPods is the best way to manage library dependencies in iOS and OS X projects. By using cocoa pods there is no need of downloading the code from github and copying to your project. There are plenty of open source libraries now available with C…
I recently went through the process of creating an installable image of an iPhone mobile app (an .ipa file) that beta testers could load onto their test devices. The process involved quite a few steps, but both Appcelerator and Diawi.org had decent …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
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.

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now