Anatomy of an iPhone Application Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Containers CMPS Reusable containers Simple data structures in almost all nontrivial programs Examples: vectors, linked lists, stacks, queues, binary.
Detecting Collisions CSE 391 Fall 2012 Tony Scarlatos.
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.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
View Controllers (second part) Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
IPhone Development Crash Course By Dylan Harris
IPhone Development JaxCodeCamp Who am I David Fekke.NET Developer, ColdFusion Work at LPS Presenter JaxDug, JaxJug, JSUG & JaxFusion Mac User 1986.
IPhone 101. Outline Objective-C Random bits of the API Using the simulator Debugging with Xcode.
Exploring the iPhone SDK Toyin Adedokun & Daniel Laughlin.
IRead Group Members: Oscar Perez, Paul Kennedy, Matt Cardin.
Intro to Object-Oriented (“OO”) Design. OO Design Simplified methodology 1. Write down detailed description of problem 2. Identify all (relevant) nouns.
The Composite Pattern.. Composite Pattern Intent –Compose objects into tree structures to represent part-whole hierarchies. –Composite lets clients treat.
Introduction to Apps Development for the iPhone and the Android OS Art Gittleman Professor, Computer Science Calif State Univ Long Beach Feb 28, 2011.
Chapter 6: Graphical User Interface (GUI) and Object-Oriented Design (OOD) J ava P rogramming: Program Design Including Data Structures Program Design.
C# Event Processing Model Solving The Mystery. Agenda Introduction C# Event Processing Macro View Required Components Role of Each Component How To Create.
Memory Management and Automatic Reference Counting/ Copying Objects Archiving Copyright © 2012 by Yong-Gu Lee
Sprite Animation CSE 391 Fall 2012 Tony Scarlatos.
IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is.
Java Beans.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to Objective-C and Xcode (Part 3) FA 175 Intro to Mobile App Development.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Using the Netbeans GUI Builder. The Netbeans IDE provides a utility called the GUI Builder that assists you with creating Windows applications. The Netbeans.
Programming Languages and Paradigms Object-Oriented Programming (Part II)
OS X Development Tom Schroeder. Table of Contents Who cares? HistoryObjective-CCocoaEnvironmentDesign.
FLTK Help Session By Richard Yu Gu CS 638 -Graphics Fall, 1999.
Introduction to Building Windows 8.1 & Windows Phone Applications.
Tabbed Views UITabBarController. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and.
IOS with Swift Hello world app.
Using Xcode A Beginner’s Tutorial Erin Green. This tutorial will walk you through Xcode, a software development tool for Apple’s iOS applications – We.
More on Hierarchies 1. When an object of a subclass is instantiated, is memory allocated for only the data members of the subclass or also for the members.
+ 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.
Gestures UIGestureRecognizer.
Introduction to Objective-C and Xcode (Part 5) FA 175 Intro to Mobile App Development.
Course Summary Xcode & iPhone Simulator
Sounds, Images, and Text FA 172 Intro to Mobile App Development.
Nav Controllers UINavigationController. Overview Nav Controller basics Like a tabview controller, a navViewController manages views A navigationViewController.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Chapter 14 Abstract Classes and Interfaces. Abstract Classes An abstract class extracts common features and functionality of a family of objects An abstract.
Java Programming: From Problem Analysis to Program Design, 3e Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Java Programming: From Problem Analysis to Program Design, Second Edition1 Lecture 5 Objectives  Learn about basic GUI components.  Explore how the GUI.
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
Mobile Apps Programming Chin-Sung Lin Eleanor Roosevelt High School.
Persistence CS 344 Mobile App Development Robert Muller.
Introduction to Objective-C Spring Goals An introduction to Objective-C As implemented by the Apple LLVM Compiler 4.0 (a.k.a. Clang) Only the basics…
Lecture 10 Using Interface Builder to create Mac Applications.
The iOS Platform and SDK. iOS iPhoneiPad Mini iPad.
Lecture 10: Generics & Basic Desktop Programming Svetla Boytcheva AUBG, Spring COS 240 Object-Oriented Languages.
1 FESA architecture v.1.0 Framework Configuration & Data-entry Tool 5 th December 2003.
IOS Programming Medialogy, Semester 7, 2010 Aalborg University, Aalborg David Meredith
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
Introduction to Objective-C and Xcode (Part 4) FA 175 Intro to Mobile App Development.
WebViews UIWebView. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and xib) that manages.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Iphone Online Training AcuteSoft: India: , Land Line: +91 (0) USA: , UK : +44.
Introduction to Apps Development for the iPhone and the Android OS
IOS Design Patterns Sisoft Technologies Pvt Ltd
iOS - First Application Anatomy
Wrapper Classes ints, doubles, and chars are known as primitive types, or built-in types. There are no methods associated with these types of variables.
EEC-492/693/793 iPhone Application Development
CSC 581: Mobile App Development
EEC-492/693/793 iPhone Application Development
CSC 581: Mobile App Development
Presentation transcript:

Anatomy of an iPhone Application Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson

Cocoa classes Cocoa’s Foundation framework includes essential data classes, includes basic utilities, and establishes some core programming conventions that cannot be expressed by the Objective-C language alone Nearly all Cocoa classes inherit from a root class, NSObject, defined in Foundation. NSString

Collection classes Three classes are used for collecting Cocoa objects: NSArray for ordered collections of objects, NSSet for unordered collections, NSDictionary for mapping key objects to value objects. – These three collections are immutable—once initialized, they can’t be changed.

Mutable subclasses NSMutableArray, NSMutableSet, and NSMutable-Dictionary. – The collections can store only NSObjects. If you have C primitives, you can pass them around Cocoa with the wrapper classes NSData and NSMutableData, which wrap a byte buffer, and NSNumber, an object container for any of C’s scalar (numeric) types, such as int, float, or bool.

Other specific data classes NSURL for URLs NSDate and NSTimeZone

Cocoa Touch The “Touch” part of Cocoa Touch is largely represented by the UIKit framework, also imported by default in every iPhone application. This framework offers the drawing model, event handling, application life cycle, and other essentials for a touch-based application. Some user interface component classes: UIButton, UITextView, UITableView, etc.

Parts of a Project Classes—Class files are the C and Objective-C source that you create to provide the functionality of your application. Other sources—These are source files that are generated automatically and that you are largely not responsible for or interested in. – precompiled headers file – main.m is the implementation of the main( ) function that the system calls to launch your application. – third-party library source here or procedural-C sources (.c files) that aren’t “classes”

Other parts of a Project Resources—Resources are noncode files that are nevertheless needed by your application at runtime. – Such files might include graphics or sound files, and localization dictionaries. Frameworks—These represent the frameworks that your application uses. – By default, the Xcode template links in the frameworks Core Graphics and UIKit so you’ll be able to call the various GUI classes, and Foundation for commonly used classes such as strings, collections, and URLs. Products—This folder represents the files that will be created by the build process, in this case the Hello.app iPhone application.

XCode Xcode is really the base for your application project. Although you’ll use other applications to set up the GUI elements in the nib (Interface Builder), create images (any graphics application such as Photoshop or Pixelmator), and measure performance (Instruments), the job of managing all the pieces of the application and building it falls to Xcode.

IBOutlets and IBActions A reference from code to an object in the nib is called an outlet and is designated with the keyword IBOutlet. A method that you want a nib’s objects to be able to call is an action and is designated with the keyword IBAction.

HelloUserViewController.h This code declares two outlets and one action. – (IBAction) is equivalent to (void) in that it returns no value, but using the IBAction keyword indicates our intent to connect the method to GUI events via Interface Builder

Laying Out Your Interface in IB In Xcode’s project window, double-click helloUserViewController.xib to open it with IB. From the library, drag over three objects: a label, a text field, and a button.

Customize three components as follows:

Identifying Outlets and Actions

Implementing the Action HelloUserViewController.m

Build Application

Previous in Class Assignment AddingViewController.h AddingViewController.m