View-Based Application Development Lecture 1 1. Flows of Lecture 1 Before Lab Introduction to the Game to be developed in this workshop Comparison between.

Slides:



Advertisements
Similar presentations
Zhongxing Telecom Pakistan (Pvt.) Ltd
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML Programming the World Wide Web Fourth edition.
Advanced Piloting Cruise Plot.
Chapter 16 Graphical User Interfaces
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Chapter 1 The Study of Body Function Image PowerPoint
BASIC SKILLS AND TOOLS USING ACCESS
AQute Eclipse Environment By Peter Kriens CEO aQute OSGi Director of Technology and OSGi Fellow.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
Tutorial 3 – Creating a Multiple-Page Report
XP New Perspectives on Microsoft Office Word 2003 Tutorial 7 1 Microsoft Office Word 2003 Tutorial 7 – Collaborating With Others and Creating Web Pages.
Microsoft Access 2007 Advanced Level. © Cheltenham Courseware Pty. Ltd. Slide No 2 Forms Customisation.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Mike Scott University of Texas at Austin
Word Lesson 6 Working with Graphics
Microsoft®.
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
1 NatQuery 3/05 An End-User Perspective On Using NatQuery To Extract Data From ADABAS Presented by Treehouse Software, Inc.
Suite Suite 2 TPF Software – Overview Binary Editor Remote Scripts zTREX Add-Ins & Project Integration with Source Control Manager.
ABC Technology Project
User Friendly Price Book Maintenance A Family of Enhancements For iSeries 400 DMAS from Copyright I/O International, 2006, 2007, 2008, 2010 Skip Intro.
School of Geography FACULTY OF ENVIRONMENT Working with Tables 1.
Creating Tables in a Web Site
Microsoft Access.
Vanderbilt Business Objects Users Group 1 Reporting Techniques & Formatting Beginning & Advanced.
1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Security Panel Application Introducing.
Chapter 11: The X Window System Guide To UNIX Using Linux Third Edition.
VOORBLAD.
© Paradigm Publishing, Inc Excel 2013 Level 1 Unit 2Enhancing the Display of Worksheets Chapter 8 Adding Visual Interest to Workbooks.
Benchmark Series Microsoft Excel 2013 Level 2
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Chapter 5 Microsoft Excel 2007 Window
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3-1.
© 2012 National Heart Foundation of Australia. Slide 2.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Executional Architecture
Macromedia Dreamweaver MX 2004 – Design Professional Dreamweaver GETTING STARTED WITH.
25 seconds left…...
1 Final Cut Pro X Winter Connections Conference 2012.
Januar MDMDFSSMDMDFSSS
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
13-1 © Prentice Hall, 2004 Chapter 13: Designing the Human Interface (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Chapter 13 Web Page Design Studio
Lesson 13 Editing and Formatting Documents
The PLASTIC Model to HUTN transformation tool UDA.
Abstract Class, Packages and interface from Chapter 9
1 Abstract Class and Packages from Chapter 9 Lecture.
Contract Audit Follow-Up (CAFU) 3.5 Pre-Defined & Ad hoc Reports November 2009 ITCSO Training Academy.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface Developing a Simple Graphical User Interface (GUI)
Chapter 8 Improving the User Interface
Chapter 16 Graphical User Interfaces John Keyser’s Modifications of Slides by Bjarne Stroustrup
What’s new in WebSpace Changes and improvements with Xythos 7.2 Effective June 24,
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
IOS with Swift Hello world app.
+ An Intro To Xcode By Sarah Montroy. + What is Xcode?
View Controllers Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
Lecture 10 Using Interface Builder to create Mac Applications.
Apple Xcode with Swift Demo
Presentation transcript:

View-Based Application Development Lecture 1 1

Flows of Lecture 1 Before Lab Introduction to the Game to be developed in this workshop Comparison between Console Programming and GUI Programming iPhone View-Based Application Skeleton During Lab Introduction to development tools Managing UI components through Interface Builder Intrinsic C code, and Objective-C code 2

Introduction to the Game 3 Name: Volcano Rock Escaping Objective: Given limited lives, the player should escape from as many rocks as possible Screenshot: Next Slide

Screenshot of the Game 4

Console programming – Single Execution Flow 5 Sequential flow of console application: Input from user Output result Input from user Output result Input from user Output result ….. Boring black and white interface

GUI (Graphical User Interface) Programming – Multiple Execution Flows 6 Multiple media inputs/outputs Multiple flows of GUI application

Console Programming vs. GUI Programming – Development Issues 7 Console programming: write the code compile it run and debug it GUI programming: also need to design the interface (i.e., screen layout of the application) with the help of an interface builder work on code and interface alternately (similar to building web pages)

More on GUI Programming You can design your interface using Interface Builder In Interface Builder, you can also specify a name for referring to a particular image in the codes e.g.,we use life3Image to represent the 3 rd life image on the interface When you want to put an image in another position, you can specify a new location inside the program codes 8

View-Based Application Project – VolcanoRockEscaping 9 Main ViewController App Delegate

10 main App Delegate View Controller Screen View Main Window View-Based Application Architecture View Controller

11 main App Delegate View Controller Screen View Main Window View-Based Application Architecture - Main View Controller Represent as a file main.m Acts like that of main function in C/C++ program which will be the first place to call during the program starts Invoke App Delegate

12 main App Delegate View Controller Screen View Main Window Invoke View-Based Application Architecture – App Delegate View Controller Invoke Represent as files AppDelegate.h- Header File AppDelegate.m- Implementation File Will be activated to handle the several application events: Application Launched Application Terminated Further invoke: Main Window Frame View Controller

13 main App Delegate View Controller Screen View Main Window Invoke View-Based Application Architecture – Main Window Frame View Controller Invoke Acts as a frame container to include all other UI Components

14 main App Delegate View Controller Screen View Main Window Invoke View-based Application Architecture – View Controller View Controller Invoke Represent as files ViewController.xib ViewController.m ViewController.h Controls various UI components on the screen view, i.e., when, where, and how the UI components are shown We can implement the code logic here to control the UI By default, the screen view of the view controller is added to the main window during startup of the view controller

More on View Controller The main aim of the view controller is to control the UI components on its screen view Add UI components on to the screen Implement code logic This is the ONLY place we need to work on in this workshop Two Types of Files Interface File - ViewController.xib Code Logic File - ViewController.h + ViewController.m 15

iPhone App Development Tools Xcode Text Editor Compiler iPhone Simulator Test your app Interface Builder Building up the interface of an app 16

Xcode 17 Basically, we need a place to write our iPhone app and compile the source codes. In Mac, Xcode is provided to do so

Xcode Layout File Text Editor 2. Compile and Run 3. Source Files Location 1. Target Device/Simulator

File Text Editor in Xcode When you highlight the file here 2. Corresponding content will be shown here

Target Selection – Device/iPhone Simulator 20 Select whether your app would run in a real device or iPhone simulator Note that your real device name will replace iOS Device once a valid real device is connected to the Mac with Xcode

iPhone Simulator 21 iPhone Simulator simulates most of the functions of a real iPhone device It is running as a process in Mac Will be prompted up automatically when you select simulator to run the app

Interface Builder I 22 Click onViewController.xib a. Library Window b. View c. XIB Components Window d. Inspector Window

Interface Builder II 23 a) This part includes the library of the UI components that can be added to the view b) This is the view existing in the view controller. Note that Interface Builder file and the codes are not connected at this moment. Therefore, even though the supported orientation is set to landscape (right home button), it is not reflected in the interface builder c) Components included in the XIB file d) We can change the attributes information of the UI components in this part

Screen View (Display of iPhone) Orientation and Coordinate Representation 24 (0, 0) (480, 320) (480, 0) (0, 320) Landscape Mode (0, 0) (320, 0) (320, 480)(0, 480) Portrait Mode +y +x +y +x The coordinate system of the screen view can be adjusted based on the its orientation Start from origin (0, 0) on the left upper corner X coordinate increases towards the right Y coordinate increases towards the bottom

What is a UI Component? A UI component is something a user can see in the screen view, such as a label, an image, etc. It is also referred as UIView Each UIView has a bounding box to describe its size and location (relative to the screen view) Different components have their unique attributes e.g., you can set text for a label, put an image in an image view Origin (x, y) height width Center (x, y) I am Carson A UILabel 25

UI Components Example 26 UIImageView UILabel UIButton

Creating UI Components Through Interface Builder You can add in a UI component by drag and drop the UI component from the library to the view directly this is an analogy to Dreamweaver or Frontpage in making webpage Through Writing Codes directly Declare and create UI components in the codes Specify the size, location, etc. of the component You can create additional UI components during runtime 27

Moving a UI Component in Runtime The drag and drop way in Interface Builder creates a static UI component (it would not move) To change the properties of the UI component during runtime, we need to: Define a variable representing the image using Interface Builder The variable is known as IBOutlet and is generally represented by a variable of the same type of the UI component in codes Connect the UI component to the name declared 28

UI Components Example 29 Properties will change during runtime Will not change during runtime

IBOutlet – A variable to represent the UIComponent 30 life1Image life2Image life3Image scoreLabel timeLabel

IBAction – A function called when an action on UI Component occurs 31 Define facebookButtonPressed: function This function will be invoked when user presses on the facebook Button