Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


DAY 1 :: Beginner iOS Course

This course will cover Tools and APIs required to build applications for the iPhone and iPad platform using the iOS SDK. User interface designs for mobile devices and unique user interactions using multi-touch technologies.

Mihai Draghici

on 11 November 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of DAY 1 :: Beginner iOS Course

17x Tues nights 7pm-9pm
10 minute break @ 8pm
Stay after for 1:1 (up to 1 hour)
App selection & release process
Online access (videos & prezi)
Ask me questions via email
Quizzes & Contributions
Final Project Presentation
iOS Technology Overview
Derived from core OS X technologies, the amazing user experience of iOS has been streamlined to take maximum advantage of iPhone, iPad, and iPod touch hardware. Technologies shared between iOS and OS X include the OS X kernel, BSD sockets for networking, and Objective-C and C/C++ compilers for native performance.
Object Oriented Programming Concepts
Every programming paradigm comes with its own terminology and metaphors. A few basic concepts before you can begin writing any code...you need to know these well for this class!
Beginner iOS Course :: DAY 1
Day 1
Class Logistics
OO Concepts
iOS Design Overview
MVC Framework
Objective-C Language
Pick an App to build!

MVC Framework
The Model-View-Controller (MVC) design pattern assigns objects in an application one of three roles: model, view, or controller. The pattern defines not only the roles objects play in the application, it defines the way objects communicate with each other.
Class Logistics, OO Concepts, iOS, MVC, Objective-C
An Object
Objects are key to understanding object-oriented technology. Look around right now and you'll find many examples of real-world objects: water bottle, your watch, your phone, your chair.
Interface & Implementation
All programming languages provide devices that help express abstractions (a concept or idea not associated with any specific instance). In essence, these devices are ways of grouping implementation details, hiding them, and giving them, at least to some extent, a common interface—much as a watch separates its face from its internal gears.
A Class
Objects of the same kind are said to be members of the same class.
All members of a class are able to perform the same methods and have matching sets of instance variables.
They also share a common definition; each kind of object is defined just once.
Encapsulation keeps the implementation of an object out of its interface.
The ability of different objects to respond, each in its own way, to identical messages is called polymorphism.
Methods & Messages
Method names are part of an object’s interface. When a message is sent requesting that an object do something, the message names the method the object should perform.

Because different objects can have methods with the same name, the meaning of a message must be understood relative to the particular object that receives the message. The same message sent to two different objects can invoke two distinct methods.
They all have behavior and state. Your bottle has properties (how full the bottle is, whether or not it’s open, how warm its contents are) with behavior (the ability to dispense its contents at various flow rates, to be opened or closed, to withstand high or low temperatures).
Benefits of Using Objects
Modularity: The source code for an object can be written and maintained independently of the source code for other objects. Once created, an object can be easily passed around inside the system.
Information-hiding: By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world.
Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program. This allows specialists to implement/test/debug complex, task-specific objects, which you can then trust to run in your own code.
Plug-n-play and debugging: If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement.
A class usually represents a noun, such as a person, place or thing. For example, a "Bottle" class would represent the properties and functionality of a bottle in general. A single, particular bottle would be an instance of the "Bottle" class, an object of the type "Bottle".
Polymorphism results from the fact that every class lives in its own namespace (an abstract container or environment created to hold a logical grouping of unique objects). The names assigned within a class definition don’t conflict with names assigned anywhere outside it.
The easiest way to explain something new is to start with something understood.
With this in mind, object-oriented programming languages permit you to base a new class definition on a class already defined. The base class is called a superclass; the new class is its subclass. The subclass definition specifies only how it differs from the superclass; everything else is taken to be the same.
Nothing is copied from superclass to subclass. Instead, the two classes are connected so that the subclass inherits all the methods and instance variables of its superclass.
Cocoa Touch
Cocoa Touch is the programming framework driving user interaction on iOS. Buttons, table lists, page transitions, and gestures on the iPhone are unique for the pocketable form factor, and all this UI power is available to developers through the Cocoa Touch frameworks.
Graphics & Animation
iOS delivers a wide-range of graphics capabilities, such as comprehensive 2D drawing, accelerated 3D rendering, and direct access to video playback and capture. Using high-level frameworks, you can create gorgeous animations and transitions within your app’s UI.
Complete Assortment of Frameworks
Core Audio
Media Library
AV Foundation
Core Data
Core Animation
Quartz 2D
BSD Sockets
Address Book
Core Location
Map Kit
Store Kit
Audio & Video
iOS delivers rich audio and video capabilities. Stream and play full-screen video within your app. Get full programmatic control over video playback and capture. Extend the viewing experience of content from your app with AirPlay.

Leverage full control over the audio processing capabilities of iPad, iPhone, and iPod touch with Core Audio. And for truly sophisticated effects, model audio in 3D with OpenAL.
Data Management
iOS has a comprehensive collection of tools and frameworks for storing, accessing, and sharing data.

Core Data is a full-featured data modeling framework for object-oriented Cocoa Touch applications, while SQLite is perfect for low-level relational database work.

Applications can share data using a URL-based system that works across all of iOS. Web apps can persist data in a client-side cache with the HTML5 data storage API.

iOS apps even have access to a device’s global data such as contacts in the Address Book, and photos in the Photo Library.
Networking & Internet
From the fine-grained control of BSD Sockets, to finding other devices or computers with Bonjour, to display of web content with the WebKit-powered Safari web browser, you have many options for accomplishing a wide range of networking tasks.

Your application has access to these features through high-level frameworks that make it easy to connect to, render, and interact with information anywhere in the world.
Objective-C Language
Model Objects
Model objects encapsulate the data specific to an application and define the logic and computation that manipulate and process that data.

For example, a model object might represent a character in a game or a contact in an address book.

A model object can have to-one and to-many relationships with other model objects, and so sometimes the model layer of an application effectively is one or more object graphs.
Communication: User actions in the view layer that create or modify data are communicated through a controller object and result in the creation or updating of a model object. When a model object changes (for example, new data is received over a network connection), it notifies a controller object, which updates the appropriate view objects.
View Objects
A view object is an object in an application that users can see. A view object knows how to draw itself and can respond to user actions. A major purpose of view objects is to display data from the application’s model objects and to enable the editing of that data. Despite this, view objects are typically decoupled from model objects in an MVC application.
Communication: View objects learn about changes in model data through the application’s controller objects and communicate user-initiated changes—for example, text entered in a text field—through controller objects to an application’s model objects.
Controller Objects
A controller object acts as an intermediary between one or more of an application’s view objects and one or more of its model objects. Controller objects are thus a conduit through which view objects learn about changes in model objects and vice versa. Controller objects can also perform setup and coordinating tasks for an application and manage the life cycles of other objects.
Communication: A controller object interprets user actions made in view objects and communicates new or changed data to the model layer. When model objects change, a controller object communicates that new model data to the view objects so that they can display it.
Interface for a Class
Basic Syntax
The Objective-C syntax used to declare a class interface looks like this:
@interface XYZPerson : NSObject

- (void)sayHello;

Property Declaration
Declarations for these properties should be added inside the interface, like this:
@interface XYZPerson : NSObject

@property NSString *firstName;
@property NSString *lastName;

@property int yearOfBirth;

@property (readonly) NSString *middleName;

Method Declarations
- (void)someMethod;
- (void)someMethodWithValue:(SomeType)value;

- (void)someMethodWithFirstValue:(SomeType)value1 secondValue:(AnotherType)value2;
Given that Objective-C software is built from a large network of objects, it’s important to note that those objects can interact with each other by sending messages. In Objective-C terms, one object sends a message to another object by calling a method on that object.
Implementation of a Class
Basic Syntax
The basic syntax to provide the implementation for a class looks like this:
#import "XYZPerson.h"

@implementation XYZPerson

- (void)sayHello {
NSLog(@"Hello, World!");

Objects Send &
Receive Messages
Methods Can Return Values
- (int)magicNumber {
return 42;

int interestingNumber = [someObject magicNumber];
What is the value of my
Objects Can Send Messages to Themselves
Abstraction is a process by which concepts are derived from the usage and classification of literal ("real" or "concrete") concepts, first principles, or other methods.
Reduce complexity
Allow for implementation to be modified without impacting its users
Create a common interface to support polymorphism (treating all implementations of the abstracted layer the same.
Force users to extend the implementation rather than modify
Support cross platform by changing the implementation per platform
For example, abstracting a leather soccer ball to the more general idea of a ball retains only the information on general ball attributes and behavior, eliminating the other characteristics of that particular ball.
Full transcript