SlideShare a Scribd company logo
iOS Application Development by  Neha Goel
Agenda Learn about  LANGUAGE FRAMEWORK TOOLS required for developing applications for iOS based devices(iPhone, iPad and iPod Touch).
How to develop an application ?
STEP 1: Get a Mac System To develop iOS applications, you need a Mac with Mac OS X 10.6.6 or later.
STEP 2: Learn Objective C Objective-C  is a reflective, object-oriented programming language that adds  Smalltalk-style messaging to the C programming language. Today, it is used primarily on Apple's Mac OS X and iOS: two environments based on the  OpenStep standard, though not compliant with it. Objective-C is the primary language used for Apple's Cocoa API. SYNTAX: Objective-C is a thin layer on top of C, and moreover is a  strict superset  of C;  it is possible to compile any C program with an Objective-C compiler, and to  freely include C code within an Objective-C class.  Objective-C derives its object syntax from Smalltalk. All of the syntax for non-object-oriented operations (including primitive variables, pre-processing, expressions, function declarations, and function calls) are identical to that of  C, while the syntax for object-oriented features is an implementation of  Smalltalk-style messaging.
Create Interface File (.h) The interface of a class is usually defined in a  header file . A common convention is to name the header file after the name of the class, e.g. Ball.h would contain the interface for the class Ball. An interface declaration takes the form: @interface classname : superclass{ // instance variables(class members); } + (return_type) classMethod; + (return_type) classMethod1WithParameter1:(parm1_type)parm1 parameter2:(parm2_type)parm2; -  (return_type) instanceMethod1WithParameter1:(parm1_type)parm1 parameter2:(parm2_type)parm2; @end In the above,  plus signs denote  class methods (class static functions),  or methods that can be called without an instance of the class, and minus signs denote  instance methods (instance member functions),  which can only be called within a particular instance of the class. Class methods also have no access to instance variables. (int) addWithOperand1: (int) op1 operand2: (int) op2;  (Objective-C Syntax) int add (int op1,op2);    (C Syntax)
Create  Implementation File (.m) The interface only declares the class interface and not the methods themselves:  the actual code is written in the implementation file . Implementation (method) files normally have the file  extension .m, which originally signified "messages" . #import “classname.h” @implementation classname  + (return_type)classMethod { // implementation  } - (return_type)instanceMethod { // implementation  }  @end  Objective-C: (int) method :(int) i { return [self square_root:i]; }  C : int function (int i) {  return square_root(i);  }
Methods The Objective-C programming language has the following particular syntax for applying methods to classes and instances: [ Class Or Instance method ]; The Objective-C model of object-oriented programming is based on  message passing  to object  instances. In Objective-C  one does not call a method; one sends a message . When you ask a class or an instance to perform some action, you say that you are sending it a message; the recipient of that  message is called the receiver. So another way to look at the general format described previously is  as follows: [ receiver message ] ; Sending the message  method  to the object pointed to by the pointer  obj  would require the following code in C++: obj->method(argument);  In Objective-C, this is written as follows: [obj method: argument];
Instantiation Once an Objective-C class is written, it can be instantiated. This is done by  first allocating the memory for a new object and then by  initializing  it. An  object is not fully functional until both steps have been  completed . These  steps should be accomplished with a single line of code  so that there is never  an allocated object that hasn't undergone initialization.
Init Equals to CONSTRUCTOR in C++ -(id)initWithName : (NSString *)  newN ame{ self=[super init]; if(self){ self.name=newName; } return self; } -(id)init{ self=[super init]; if(self){ } return self; }
Properties Objective-C 2.0 introduces a new syntax to declare instance variables as  properties , with optional  attributes to configure the  generation of accessor methods . Properties are, in a sense, public instance variables; that is, declaring an instance variable as a property provides external classes with access  (possibly limited, e.g. read only) to that property. A property may be declared as " readonly ", and may be provided with storage semantics such as  "assign", "copy" or "retain".  By default, properties are considered atomic, which results in a lock preventing multiple threads from accessing them at the same time. A property can be declared as "nonatomic", which removes this lock. @interface Person : NSObject {  NSString *name;  int age;  } @property(copy) NSString *name; @property(readonly) int age; -(id)initWithAge:(int)age;  @end  Properties are implemented by way of the  @synthesize  keyword, which generates getter and setter methods according to the property declaration. @implementation Person  @synthesize name;
self Keyword self.name= @”MyName” It is equivalent to: [self setName:@”MyName”]; name= @”MyName” Assignment to iVar name. getter setter NSString *tempName=nil; tempName=self.name; It is equivalent to: tempName=[self name];
Accessing Properties Properties can be accessed using the traditional  message passing syntax ,  dot notation , or by name via the  "valueForKey:"/"setValue:forKey:"  methods. Person *aPerson = [[Person alloc] initWithAge: 53];  aPerson.name = @"Steve";  //  NOTE:   dot notation, uses synthesized setter, equivalent to [aPerson setName: @"Steve"]; NSLog(@"Access by message (%@), dot notation(%@), property name(%@) and direct instance variable access (%@)", [aPerson name],  aPerson.name,  [aPerson valueForKey:@"name"],  aPerson->name);
Protocols A protocol is  a list of methods  that is shared among classes. The methods listed in the protocol  do not  have corresponding implementations ; they’re meant to be implemented by someone else. A protocol  provides a way to define a set of methods that are somehow related with a specified name. The  methods are typically documented so that you know how they are to perform and so that you can  implement them in your own class definitions, if desired.  If you decide to implement all of the required  methods for a particular protocol, you are said to  conform to or adopt  that protocol.
Syntax @protocol Printing -(void) print; @end denotes that there is the abstract idea of displaying some text. By stating that the protocol is implemented  in the class definition: @interface SomeClass : SomeSuperClass <Printing>  @end  #import “Printing.h” @interface SomeClass -(void) print{ NSLog(@”IMPLEMENTING PRINT METHOD OF PRINTING PROTOCOL”); } @end  instances of SomeClass claim that they will provide an implementation for the instance method using  whatever means they choose.
id Data Type Objective-C provides a special type that  can hold any object you can construct with Objective-C regardless of class. This type is called id, and can be used to make your Objective-C programming  generic. Let's look at an example of what is known as a  container class , that is, a class that is used to hold an  object, perhaps in a certain data structure. Say our container class is a linked list, and we have a linked list of LinkedListNode objects. We don't  know what data we might put into the linked list, so this suggests that we might use an id as a central  data type. Our interface then might look like @interface LinkedListNode : NSObject{ id data; LinkedListNode *next;  }  - (id) data; - (LinkedListNode *) next; @end
Cocoa/Cocoa Touch Cocoa is an application environment for both the Mac OS X operating system and iOS, the operating system used on Multi-Touch devices such as iPhone, iPad, and iPod touch. It consists of a suite of object-oriented software libraries, a runtime system, and an integrated development environment.  Cocoa in the architecture of iOS
Core OS This level contains  the kernel the file system networking infrastructure security power management and  a number of device drivers.  It also has the  libSystem library , which supports the POSIX/BSD 4.4/C99 API specifications and includes system-level APIs for many services.
Core Services The frameworks in this layer provide core services, such as string manipulation collection management networking  URL utilities contact management and  preferences. They also provide services based on hardware features of a device, such as the GPS, compass,  accelerometer, and gyroscope.  Examples of frameworks in this layer are  Core Location ,  Core Motion , and  System Configuration .  This layer includes both  Foundation and Core Foundation frameworks  that provide abstractions for  common data types such as strings and collections.  The Core Frameworks layer also contains  Core Data , a framework for object graph management  and object persistence.
Media The frameworks and services in this layer depend on the Core Services layer  and provide graphical and multimedia services to the Cocoa Touch layer.  They include  Core Graphics Core Text OpenGL ES Core Animation AVFoundation Core Audio and Video Playback.
Cocoa Touch The frameworks in this layer directly support applications based in iOS. They include  frameworks such as  Game Kit, Map Kit and iAd . The Cocoa Touch layer and the Core Services layer each has an Objective-C framework  that is especially important for developing applications for iOS. These are the  core  Cocoa  frameworks in iOS : UIKit.: This framework provides the objects an application displays in its user interface and defines  the structure for application behavior, including event handling and drawing.  Foundation: This framework defines the basic behavior of objects, establishes mechanisms for their  management, and provides objects for primitive data types, collections, and operating- system services.
Model View Controller(Composite Design Pattern) App Delegate( .h/.m) ViewController (.h/.m) View (.xib) Model(.h/.m)
Lets build Hello World ! DEMO
 
Ad

More Related Content

What's hot (20)

C#ppt
C#pptC#ppt
C#ppt
Sambasivarao Kurakula
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
Srichandan Sobhanayak
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
Gamindu Udayanga
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1pp
J. C.
 
C++ programing lanuage
C++ programing lanuageC++ programing lanuage
C++ programing lanuage
Nimai Chand Das
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
Baljit Saini
 
Object Oriented Programming using C++ Part I
Object Oriented Programming using C++ Part IObject Oriented Programming using C++ Part I
Object Oriented Programming using C++ Part I
Ajit Nayak
 
Andy On Closures
Andy On ClosuresAndy On Closures
Andy On Closures
melbournepatterns
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
9054799 dzone-refcard267-kotlin
9054799 dzone-refcard267-kotlin9054799 dzone-refcard267-kotlin
9054799 dzone-refcard267-kotlin
Zoran Stanimirovic
 
pebble - Building apps on pebble
pebble - Building apps on pebblepebble - Building apps on pebble
pebble - Building apps on pebble
Aniruddha Chakrabarti
 
Java OOP Concepts 1st Slide
Java OOP Concepts 1st SlideJava OOP Concepts 1st Slide
Java OOP Concepts 1st Slide
sunny khan
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP Implementation
Fridz Felisco
 
Object Oriented Programming using JAVA Notes
Object Oriented Programming using JAVA Notes Object Oriented Programming using JAVA Notes
Object Oriented Programming using JAVA Notes
Uzair Salman
 
Classes and data abstraction
Classes and data abstractionClasses and data abstraction
Classes and data abstraction
Hoang Nguyen
 
Domain-Specific Languages
Domain-Specific LanguagesDomain-Specific Languages
Domain-Specific Languages
Javier Canovas
 
Dart workshop
Dart workshopDart workshop
Dart workshop
Vishnu Suresh
 
Java Basics
Java BasicsJava Basics
Java Basics
Dhanunjai Bandlamudi
 
C++ Interview Questions
C++ Interview QuestionsC++ Interview Questions
C++ Interview Questions
Kaushik Raghupathi
 
Operator Overloading and Scope of Variable
Operator Overloading and Scope of VariableOperator Overloading and Scope of Variable
Operator Overloading and Scope of Variable
MOHIT DADU
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
Gamindu Udayanga
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1pp
J. C.
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
Baljit Saini
 
Object Oriented Programming using C++ Part I
Object Oriented Programming using C++ Part IObject Oriented Programming using C++ Part I
Object Oriented Programming using C++ Part I
Ajit Nayak
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
9054799 dzone-refcard267-kotlin
9054799 dzone-refcard267-kotlin9054799 dzone-refcard267-kotlin
9054799 dzone-refcard267-kotlin
Zoran Stanimirovic
 
Java OOP Concepts 1st Slide
Java OOP Concepts 1st SlideJava OOP Concepts 1st Slide
Java OOP Concepts 1st Slide
sunny khan
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP Implementation
Fridz Felisco
 
Object Oriented Programming using JAVA Notes
Object Oriented Programming using JAVA Notes Object Oriented Programming using JAVA Notes
Object Oriented Programming using JAVA Notes
Uzair Salman
 
Classes and data abstraction
Classes and data abstractionClasses and data abstraction
Classes and data abstraction
Hoang Nguyen
 
Domain-Specific Languages
Domain-Specific LanguagesDomain-Specific Languages
Domain-Specific Languages
Javier Canovas
 
Operator Overloading and Scope of Variable
Operator Overloading and Scope of VariableOperator Overloading and Scope of Variable
Operator Overloading and Scope of Variable
MOHIT DADU
 

Viewers also liked (20)

Rankig prévio classificados polo sobral ce caixa 2014
Rankig prévio classificados polo sobral ce caixa 2014Rankig prévio classificados polo sobral ce caixa 2014
Rankig prévio classificados polo sobral ce caixa 2014
Francisco Brito
 
iOS 7 Beginner Workshop
iOS 7 Beginner WorkshopiOS 7 Beginner Workshop
iOS 7 Beginner Workshop
Christopher Truman
 
Conferencia Desarrollo de Aplicaciones iOS (Ecuador)
Conferencia Desarrollo de Aplicaciones iOS (Ecuador)Conferencia Desarrollo de Aplicaciones iOS (Ecuador)
Conferencia Desarrollo de Aplicaciones iOS (Ecuador)
Nelson Cruz Mora
 
desarrollo de aplicaciones para ios
desarrollo de aplicaciones para iosdesarrollo de aplicaciones para ios
desarrollo de aplicaciones para ios
Alysha Nieol
 
Ios.s2
Ios.s2Ios.s2
Ios.s2
ulcurbegi
 
iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11
iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11
iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11
MobileMonday Estonia
 
I os
I osI os
I os
Juaniito Arteaga
 
Ios.s5
Ios.s5Ios.s5
Ios.s5
ulcurbegi
 
Charla desarrollo de aplicaciones en iOS para iPhone y iPad
Charla desarrollo de aplicaciones en iOS para iPhone y iPadCharla desarrollo de aplicaciones en iOS para iPhone y iPad
Charla desarrollo de aplicaciones en iOS para iPhone y iPad
Luis Consiglieri
 
Ios
IosIos
Ios
Tensor
 
0032 aplicaciones para_dispositivos_ios
0032 aplicaciones para_dispositivos_ios0032 aplicaciones para_dispositivos_ios
0032 aplicaciones para_dispositivos_ios
GeneXus
 
Ios.s1
Ios.s1Ios.s1
Ios.s1
ulcurbegi
 
Desarrollo para iPhone y iPad con Flash CS5
Desarrollo para iPhone y iPad con Flash CS5Desarrollo para iPhone y iPad con Flash CS5
Desarrollo para iPhone y iPad con Flash CS5
Francisco Javier Arce Anguiano
 
CodeWithChris Q&A: I Have an App Idea. Where Do I Start?
CodeWithChris Q&A: I Have an App Idea. Where Do I Start?CodeWithChris Q&A: I Have an App Idea. Where Do I Start?
CodeWithChris Q&A: I Have an App Idea. Where Do I Start?
Chris
 
Building second screen TV apps
Building second screen TV appsBuilding second screen TV apps
Building second screen TV apps
vrt-medialab
 
Hello World Program in xcode ,IOS Development using swift
Hello World Program in xcode ,IOS Development using swiftHello World Program in xcode ,IOS Development using swift
Hello World Program in xcode ,IOS Development using swift
Vikrant Arya
 
SISTEMA OPERATIVO IOS
SISTEMA OPERATIVO IOSSISTEMA OPERATIVO IOS
SISTEMA OPERATIVO IOS
Paola Yitzel Sanchez
 
Servidor y cliente iOS en 45min
Servidor y cliente iOS en 45minServidor y cliente iOS en 45min
Servidor y cliente iOS en 45min
Javier Moreno
 
iOS - Overview of Mobile Application Developement
iOS - Overview of Mobile Application Developement iOS - Overview of Mobile Application Developement
iOS - Overview of Mobile Application Developement
Rohit214
 
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
Andri Yadi
 
Rankig prévio classificados polo sobral ce caixa 2014
Rankig prévio classificados polo sobral ce caixa 2014Rankig prévio classificados polo sobral ce caixa 2014
Rankig prévio classificados polo sobral ce caixa 2014
Francisco Brito
 
Conferencia Desarrollo de Aplicaciones iOS (Ecuador)
Conferencia Desarrollo de Aplicaciones iOS (Ecuador)Conferencia Desarrollo de Aplicaciones iOS (Ecuador)
Conferencia Desarrollo de Aplicaciones iOS (Ecuador)
Nelson Cruz Mora
 
desarrollo de aplicaciones para ios
desarrollo de aplicaciones para iosdesarrollo de aplicaciones para ios
desarrollo de aplicaciones para ios
Alysha Nieol
 
iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11
iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11
iOS development, Ahti Liin, Mooncascade OÜ @ MoMo Tallinn 11.04.11
MobileMonday Estonia
 
Charla desarrollo de aplicaciones en iOS para iPhone y iPad
Charla desarrollo de aplicaciones en iOS para iPhone y iPadCharla desarrollo de aplicaciones en iOS para iPhone y iPad
Charla desarrollo de aplicaciones en iOS para iPhone y iPad
Luis Consiglieri
 
0032 aplicaciones para_dispositivos_ios
0032 aplicaciones para_dispositivos_ios0032 aplicaciones para_dispositivos_ios
0032 aplicaciones para_dispositivos_ios
GeneXus
 
CodeWithChris Q&A: I Have an App Idea. Where Do I Start?
CodeWithChris Q&A: I Have an App Idea. Where Do I Start?CodeWithChris Q&A: I Have an App Idea. Where Do I Start?
CodeWithChris Q&A: I Have an App Idea. Where Do I Start?
Chris
 
Building second screen TV apps
Building second screen TV appsBuilding second screen TV apps
Building second screen TV apps
vrt-medialab
 
Hello World Program in xcode ,IOS Development using swift
Hello World Program in xcode ,IOS Development using swiftHello World Program in xcode ,IOS Development using swift
Hello World Program in xcode ,IOS Development using swift
Vikrant Arya
 
Servidor y cliente iOS en 45min
Servidor y cliente iOS en 45minServidor y cliente iOS en 45min
Servidor y cliente iOS en 45min
Javier Moreno
 
iOS - Overview of Mobile Application Developement
iOS - Overview of Mobile Application Developement iOS - Overview of Mobile Application Developement
iOS - Overview of Mobile Application Developement
Rohit214
 
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)End-to-end Mobile App Development (with iOS and Azure Mobile Services)
End-to-end Mobile App Development (with iOS and Azure Mobile Services)
Andri Yadi
 
Ad

Similar to iOS Application Development (20)

iOS development introduction
iOS development introduction iOS development introduction
iOS development introduction
paramisoft
 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
Javier Gonzalez-Sanchez
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
JITTAYASHWANTHREDDY
 
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
NicheTech Com. Solutions Pvt. Ltd.
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
Saurabh Narula
 
Java notes jkuat it
Java notes jkuat itJava notes jkuat it
Java notes jkuat it
Arc Keepers Solutions
 
Java notes(OOP) jkuat IT esection
Java notes(OOP) jkuat IT esectionJava notes(OOP) jkuat IT esection
Java notes(OOP) jkuat IT esection
Arc Keepers Solutions
 
OOC MODULE1.pptx
OOC MODULE1.pptxOOC MODULE1.pptx
OOC MODULE1.pptx
1HK19CS090MOHAMMEDSA
 
Jacarashed-1746968053-300050282-Java.ppt
Jacarashed-1746968053-300050282-Java.pptJacarashed-1746968053-300050282-Java.ppt
Jacarashed-1746968053-300050282-Java.ppt
DilipDas70
 
Synapseindia dot net development
Synapseindia dot net developmentSynapseindia dot net development
Synapseindia dot net development
Synapseindiappsdevelopment
 
@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf
TheertheshTheertha1
 
Objective c
Objective cObjective c
Objective c
ricky_chatur2005
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Malla Reddy University
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java script
michaelaaron25322
 
Objective c intro (1)
Objective c intro (1)Objective c intro (1)
Objective c intro (1)
David Echeverria
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
Indira Gnadhi National Open University (IGNOU)
 
Presentation 1st
Presentation 1stPresentation 1st
Presentation 1st
Connex
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
Zafor Iqbal
 
My c++
My c++My c++
My c++
snathick
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
intelliyole
 
iOS development introduction
iOS development introduction iOS development introduction
iOS development introduction
paramisoft
 
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
NicheTech Com. Solutions Pvt. Ltd.
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
Saurabh Narula
 
Jacarashed-1746968053-300050282-Java.ppt
Jacarashed-1746968053-300050282-Java.pptJacarashed-1746968053-300050282-Java.ppt
Jacarashed-1746968053-300050282-Java.ppt
DilipDas70
 
@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf
TheertheshTheertha1
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Malla Reddy University
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java script
michaelaaron25322
 
Presentation 1st
Presentation 1stPresentation 1st
Presentation 1st
Connex
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
Zafor Iqbal
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
intelliyole
 
Ad

More from Compare Infobase Limited (20)

Google +
Google +Google +
Google +
Compare Infobase Limited
 
J Query
J QueryJ Query
J Query
Compare Infobase Limited
 
Dos and Don't during Monsoon!
Dos and Don't during Monsoon!Dos and Don't during Monsoon!
Dos and Don't during Monsoon!
Compare Infobase Limited
 
Intellectual Property Rights : A Primer
Intellectual Property Rights : A PrimerIntellectual Property Rights : A Primer
Intellectual Property Rights : A Primer
Compare Infobase Limited
 
CIL initiative against Corruption
CIL initiative against CorruptionCIL initiative against Corruption
CIL initiative against Corruption
Compare Infobase Limited
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
Compare Infobase Limited
 
Arrays in PHP
Arrays in PHPArrays in PHP
Arrays in PHP
Compare Infobase Limited
 
Storage and Storage Devices
Storage and Storage DevicesStorage and Storage Devices
Storage and Storage Devices
Compare Infobase Limited
 
SQL Injection Attacks
SQL Injection AttacksSQL Injection Attacks
SQL Injection Attacks
Compare Infobase Limited
 
World No Tobacco Day
World No Tobacco DayWorld No Tobacco Day
World No Tobacco Day
Compare Infobase Limited
 
Tips for Effective Online Marketing
Tips for Effective Online Marketing Tips for Effective Online Marketing
Tips for Effective Online Marketing
Compare Infobase Limited
 
Have a safe Summer!
Have a safe Summer!Have a safe Summer!
Have a safe Summer!
Compare Infobase Limited
 
Introduction to Android Environment
Introduction to Android EnvironmentIntroduction to Android Environment
Introduction to Android Environment
Compare Infobase Limited
 
MySQL Functions
MySQL FunctionsMySQL Functions
MySQL Functions
Compare Infobase Limited
 
Software Development Life Cycle Part II
Software Development Life Cycle Part IISoftware Development Life Cycle Part II
Software Development Life Cycle Part II
Compare Infobase Limited
 
Excel with Excel
Excel with ExcelExcel with Excel
Excel with Excel
Compare Infobase Limited
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
Compare Infobase Limited
 
How to increase effective CTR, CPC and e CPM of website?
How to increase effective CTR, CPC and e CPM of website?How to increase effective CTR, CPC and e CPM of website?
How to increase effective CTR, CPC and e CPM of website?
Compare Infobase Limited
 
How do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksHow do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML Tricks
Compare Infobase Limited
 
Social Media Integration
Social Media IntegrationSocial Media Integration
Social Media Integration
Compare Infobase Limited
 
How to increase effective CTR, CPC and e CPM of website?
How to increase effective CTR, CPC and e CPM of website?How to increase effective CTR, CPC and e CPM of website?
How to increase effective CTR, CPC and e CPM of website?
Compare Infobase Limited
 
How do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksHow do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML Tricks
Compare Infobase Limited
 

Recently uploaded (20)

Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 

iOS Application Development

  • 2. Agenda Learn about LANGUAGE FRAMEWORK TOOLS required for developing applications for iOS based devices(iPhone, iPad and iPod Touch).
  • 3. How to develop an application ?
  • 4. STEP 1: Get a Mac System To develop iOS applications, you need a Mac with Mac OS X 10.6.6 or later.
  • 5. STEP 2: Learn Objective C Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Today, it is used primarily on Apple's Mac OS X and iOS: two environments based on the OpenStep standard, though not compliant with it. Objective-C is the primary language used for Apple's Cocoa API. SYNTAX: Objective-C is a thin layer on top of C, and moreover is a strict superset of C; it is possible to compile any C program with an Objective-C compiler, and to freely include C code within an Objective-C class. Objective-C derives its object syntax from Smalltalk. All of the syntax for non-object-oriented operations (including primitive variables, pre-processing, expressions, function declarations, and function calls) are identical to that of C, while the syntax for object-oriented features is an implementation of Smalltalk-style messaging.
  • 6. Create Interface File (.h) The interface of a class is usually defined in a header file . A common convention is to name the header file after the name of the class, e.g. Ball.h would contain the interface for the class Ball. An interface declaration takes the form: @interface classname : superclass{ // instance variables(class members); } + (return_type) classMethod; + (return_type) classMethod1WithParameter1:(parm1_type)parm1 parameter2:(parm2_type)parm2; - (return_type) instanceMethod1WithParameter1:(parm1_type)parm1 parameter2:(parm2_type)parm2; @end In the above, plus signs denote class methods (class static functions), or methods that can be called without an instance of the class, and minus signs denote instance methods (instance member functions), which can only be called within a particular instance of the class. Class methods also have no access to instance variables. (int) addWithOperand1: (int) op1 operand2: (int) op2; (Objective-C Syntax) int add (int op1,op2); (C Syntax)
  • 7. Create Implementation File (.m) The interface only declares the class interface and not the methods themselves: the actual code is written in the implementation file . Implementation (method) files normally have the file extension .m, which originally signified &quot;messages&quot; . #import “classname.h” @implementation classname + (return_type)classMethod { // implementation } - (return_type)instanceMethod { // implementation } @end Objective-C: (int) method :(int) i { return [self square_root:i]; } C : int function (int i) { return square_root(i); }
  • 8. Methods The Objective-C programming language has the following particular syntax for applying methods to classes and instances: [ Class Or Instance method ]; The Objective-C model of object-oriented programming is based on message passing to object instances. In Objective-C one does not call a method; one sends a message . When you ask a class or an instance to perform some action, you say that you are sending it a message; the recipient of that message is called the receiver. So another way to look at the general format described previously is as follows: [ receiver message ] ; Sending the message method to the object pointed to by the pointer obj would require the following code in C++: obj->method(argument); In Objective-C, this is written as follows: [obj method: argument];
  • 9. Instantiation Once an Objective-C class is written, it can be instantiated. This is done by first allocating the memory for a new object and then by initializing it. An object is not fully functional until both steps have been completed . These steps should be accomplished with a single line of code so that there is never an allocated object that hasn't undergone initialization.
  • 10. Init Equals to CONSTRUCTOR in C++ -(id)initWithName : (NSString *) newN ame{ self=[super init]; if(self){ self.name=newName; } return self; } -(id)init{ self=[super init]; if(self){ } return self; }
  • 11. Properties Objective-C 2.0 introduces a new syntax to declare instance variables as properties , with optional attributes to configure the generation of accessor methods . Properties are, in a sense, public instance variables; that is, declaring an instance variable as a property provides external classes with access (possibly limited, e.g. read only) to that property. A property may be declared as &quot; readonly &quot;, and may be provided with storage semantics such as &quot;assign&quot;, &quot;copy&quot; or &quot;retain&quot;. By default, properties are considered atomic, which results in a lock preventing multiple threads from accessing them at the same time. A property can be declared as &quot;nonatomic&quot;, which removes this lock. @interface Person : NSObject { NSString *name; int age; } @property(copy) NSString *name; @property(readonly) int age; -(id)initWithAge:(int)age; @end Properties are implemented by way of the @synthesize keyword, which generates getter and setter methods according to the property declaration. @implementation Person @synthesize name;
  • 12. self Keyword self.name= @”MyName” It is equivalent to: [self setName:@”MyName”]; name= @”MyName” Assignment to iVar name. getter setter NSString *tempName=nil; tempName=self.name; It is equivalent to: tempName=[self name];
  • 13. Accessing Properties Properties can be accessed using the traditional message passing syntax , dot notation , or by name via the &quot;valueForKey:&quot;/&quot;setValue:forKey:&quot; methods. Person *aPerson = [[Person alloc] initWithAge: 53]; aPerson.name = @&quot;Steve&quot;; // NOTE: dot notation, uses synthesized setter, equivalent to [aPerson setName: @&quot;Steve&quot;]; NSLog(@&quot;Access by message (%@), dot notation(%@), property name(%@) and direct instance variable access (%@)&quot;, [aPerson name], aPerson.name, [aPerson valueForKey:@&quot;name&quot;], aPerson->name);
  • 14. Protocols A protocol is a list of methods that is shared among classes. The methods listed in the protocol do not have corresponding implementations ; they’re meant to be implemented by someone else. A protocol provides a way to define a set of methods that are somehow related with a specified name. The methods are typically documented so that you know how they are to perform and so that you can implement them in your own class definitions, if desired. If you decide to implement all of the required methods for a particular protocol, you are said to conform to or adopt that protocol.
  • 15. Syntax @protocol Printing -(void) print; @end denotes that there is the abstract idea of displaying some text. By stating that the protocol is implemented in the class definition: @interface SomeClass : SomeSuperClass <Printing> @end #import “Printing.h” @interface SomeClass -(void) print{ NSLog(@”IMPLEMENTING PRINT METHOD OF PRINTING PROTOCOL”); } @end instances of SomeClass claim that they will provide an implementation for the instance method using whatever means they choose.
  • 16. id Data Type Objective-C provides a special type that can hold any object you can construct with Objective-C regardless of class. This type is called id, and can be used to make your Objective-C programming generic. Let's look at an example of what is known as a container class , that is, a class that is used to hold an object, perhaps in a certain data structure. Say our container class is a linked list, and we have a linked list of LinkedListNode objects. We don't know what data we might put into the linked list, so this suggests that we might use an id as a central data type. Our interface then might look like @interface LinkedListNode : NSObject{ id data; LinkedListNode *next; } - (id) data; - (LinkedListNode *) next; @end
  • 17. Cocoa/Cocoa Touch Cocoa is an application environment for both the Mac OS X operating system and iOS, the operating system used on Multi-Touch devices such as iPhone, iPad, and iPod touch. It consists of a suite of object-oriented software libraries, a runtime system, and an integrated development environment. Cocoa in the architecture of iOS
  • 18. Core OS This level contains the kernel the file system networking infrastructure security power management and a number of device drivers. It also has the libSystem library , which supports the POSIX/BSD 4.4/C99 API specifications and includes system-level APIs for many services.
  • 19. Core Services The frameworks in this layer provide core services, such as string manipulation collection management networking URL utilities contact management and preferences. They also provide services based on hardware features of a device, such as the GPS, compass, accelerometer, and gyroscope. Examples of frameworks in this layer are Core Location , Core Motion , and System Configuration . This layer includes both Foundation and Core Foundation frameworks that provide abstractions for common data types such as strings and collections. The Core Frameworks layer also contains Core Data , a framework for object graph management and object persistence.
  • 20. Media The frameworks and services in this layer depend on the Core Services layer and provide graphical and multimedia services to the Cocoa Touch layer. They include Core Graphics Core Text OpenGL ES Core Animation AVFoundation Core Audio and Video Playback.
  • 21. Cocoa Touch The frameworks in this layer directly support applications based in iOS. They include frameworks such as Game Kit, Map Kit and iAd . The Cocoa Touch layer and the Core Services layer each has an Objective-C framework that is especially important for developing applications for iOS. These are the core Cocoa frameworks in iOS : UIKit.: This framework provides the objects an application displays in its user interface and defines the structure for application behavior, including event handling and drawing. Foundation: This framework defines the basic behavior of objects, establishes mechanisms for their management, and provides objects for primitive data types, collections, and operating- system services.
  • 22. Model View Controller(Composite Design Pattern) App Delegate( .h/.m) ViewController (.h/.m) View (.xib) Model(.h/.m)
  • 23. Lets build Hello World ! DEMO
  • 24.