Managing Multiple Views and Segues FA 172 Intro to Mobile App Development.

Slides:



Advertisements
Similar presentations
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Advertisements

TableView and TableViewController
Create a calculator– 2nd iPhone programming exercise CSE 391 Fall 2012.
Introduction to Objective-C and Xcode (Part 1) FA 175 Intro to Mobile App Development.
UFCFSU-30-13D Technologies for the Web Creating and Using GUI Components.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user-
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Eyad Alshareef 1 Creating Custom Forms Part A. 2Eyad Alshareef Data Block and Custom Forms Data block form Data block form Based on data blocks that are.
Storyboards Managing multiple views. Overview Create a single view application Give the project a name and click “Use Storyboards” and “Use Automatic.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Sprite Animation CSE 391 Fall 2012 Tony Scarlatos.
December 10th Inservice Presenter: Linda Lopresti 9-10 English Department (K112) Contact Info: twitter:
Refactoring Moving a console app to a UI app. Refactoring Goal: change a console app to a UI app Principles: The main.m goes away The local variables.
Xcode Presentation Tom Pletzke. Creating App from template Launch Xcode Select Tabbed Application.
Website Design CLA – Transportation. Defining a Site Select: Site – New - Site Click Next.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
Chapter 9: Customize! Navigating with Tabs on a Tablet App.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Introduction to Objective-C and Xcode (Part 2) FA 175 Intro to Mobile App Development.
Spreadsheet-Based Decision Support Systems Chapter 22:
Introduction to Objective-C and Xcode (Part 3) FA 175 Intro to Mobile App Development.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 5: Investigate! Android Lists, Arrays,
Dreamweaver – Dreamweaver Extras Web Design Section 8-4 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Making a database Karyl Slim 11IOTA. In today’s lesson, we started to create a database that would contain details of endangered species. To create the.
Linking Images to Other Areas within a Blackboard Course Darek Sady.
Using the Netbeans GUI Builder. The Netbeans IDE provides a utility called the GUI Builder that assists you with creating Windows applications. The Netbeans.
1 OPOL Training (OrderPro Online) Prepared by Christina Van Metre Independent Educational Consultant CTO, Business Development Team © Training Version.
Engage! Android User Input, Variables,
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 7 – Adding and.
Android Boot Camp for Developers Using Java, 3E
Tabbed Views UITabBarController. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and.
Navigation in iPads splitViewController. Overview Create a Master-Detail application Switch Device Family to iPad Give the project a name and click “Use.
IOS with Swift Hello world app.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Create a Web View App Step-by-Step. Step 1 Create a new project in XCode using the "Single View Application" option.
+ An Intro To Xcode By Sarah Montroy. + What is Xcode?
Gestures UIGestureRecognizer.
Passing data between storyboard views Singleton pattern.
Introduction to Objective-C and Xcode (Part 5) FA 175 Intro to Mobile App Development.
OneNote 2007 Adding text and images from the web.
Sounds, Images, and Text FA 172 Intro to Mobile App Development.
CS-1020 Dr. Mark L. Hornick 1 Event-Driven Programming.
Nav Controllers UINavigationController. Overview Nav Controller basics Like a tabview controller, a navViewController manages views A navigationViewController.
Unity GUI Creating and Using GUI Components. Agenda GUI Components GUI Layout Using Styles and Skins for Design ‘Look and Feel’ Scripting GUI Communication.
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
1 Project 3 The Kumquat Society Conference. 2 Conference Registration In this project you will write a program to handle a conference registration. The.
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
More Objective-C Details FA 172 Intro to Mobile App Development.
1 Reverse a String iPhone/iPad, iOS Development Tutorial.
Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza.
Understand Databound Controls Windows Development Fundamentals LESSON 4.2A.
Introduction to Objective-C and Xcode (Part 4) FA 175 Intro to Mobile App Development.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Complete Ordering System for Promotional Literature and Samples Quick Reference and Training Guide.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
 Open the course to add an online class  Click on Add a Page (left side)  Type in a name  Click on Create  Click on the Content Tab  Click on Add.
T3/Tutorials: Data Submission
Multiple Classes and Inheritance
Incorporating Databases with ADO.NET
Using Procedures and Exception Handling
Incorporating Databases with ADO.NET
CSC 581: Mobile App Development
Nov 5th Inservice.
CSC 581: Mobile App Development
CSC 581: Mobile App Development
Presentation transcript:

Managing Multiple Views and Segues FA 172 Intro to Mobile App Development

Multiple Views Recall the RiddleApp the class created on the first day of classes Used a navigation controller, multiple views, and segues For today, we will learn to manage multiple views and pass data (objects) between views

Product inventory app Three projects ProductInvAppPrototype – Focus on user interface ProductTest – Focus on testing an existing product class ProductInvApp – Create the final app

ProductInvAppPrototype Create a single view project with three buttons Embed in a navigation controller – Select the view controller, then Navigator -> Embed In -> Navigation Controller Add one view controller to the storyboard with a label and an image view – Set label text to some product name (e.g., “Apple”) – Get an image file from the web representing the product (e.g., apple.jpeg), then drag onto “Supporting Files” section – Select the ImageView control, set the image file name

ProductInvAppPrototype Make two more copies of the view controller (that contains a label and an image) – Update these two copies so the three views represent different products (e.g., apple, orange and pomelo) Control-drag from each button to a view controller to create the corresponding segues – Select “push” Build and execute

ProductTest Create a single-view application with a single button – Add an action connection – Test code will be placed in the corresponding method Download the Product class (Product.h and Product.m) – Three properties: name, imgFileName, and stockLevel (the first two are of type NSString* the third is an int) – An initWith… method that initializes the properties – Methods to increase/decrease stockLevel: -(void) acceptDelivery:(int) qty -(void) releaseStock:(int) qty Test the Product class (test code provided in website)

ProductInventoryApp Follow instructions posted on the course website Summary – Two view controllers (controlled by a navigation controller), one for the main interface, the other for the product – Product class must be included in the project – Three products created by main view controller – Detail/product view controller has its display based on a product object

ProductInventoryApp: main view No properties defined in ViewController.h file No outlet connections No action connections (button click functionality handled through the segues) Three product variables declared outside of the methods within the ViewController.m file (these could have been properties but there is no reason to have the data available as properties) Product objects created within viewDidload method (initialization code executed when view appears) prepareForSegue method checks which button was pressed (which segue was used) and then sets the appropriate product to be set by the second view

ProductInventoryApp: product view Separate class (with superclass UIViewController) needs to be created and associated to this view controller Properties defined in.h file – outlet connections for all controls (except buttons) – One product object (to be set by the main view, but used by this view for display) Action connections (for the add and remove buttons) viewDidload contains code (in.m file) that displays details of the product object Code for the add/remove actions – Retrieve data from the text field and convert to int – Call methods to increase/decrease stock on the product object – Redisplay stock level

ProductInventoryApp