SlideShare a Scribd company logo
1 of 21
Download to read offline
Handling Basic Interaction




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   1
The Model-View-Controller Paradigm
• Model-View-Controller (MVC) is a very logical
  way of dividing the code that makes up a GUI-
  based application.
• The MVC pattern divides all functionality into
  three distinct categories:
       – Model: The classes that hold your application’s data.
       – View: Made up of the windows, controls, and other
         elements that the user can see and interact with.
       – Controller: The code that binds together the model
         and view. It contains the application logic that decides
         how to handle the user’s inputs.

Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com                2
Looking at the View Controller
• The Button Fun folder should contain four
  source code files (the ones that end in .h or .m)
  and a single nib file.




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   3
Looking at the View Controller
• The controller class called BIDViewController is
  responsible for managing our application’s
  view.
• contents of the BIDViewController header file:




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   4
Outlets and Actions
• A controller class can refer to objects in a nib
  file by using a special kind of property called
  an outlet.
• interface objects in nib file can be set up to
  trigger special methods in controller class.
  These special methods are known as action
  methods.


Eng. Abdulrazzaq Alnajjar        iabdulrazzaq@outlook.com   5
Outlets
• Outlets are special Objective-C class
  properties that are declared using the
  keyword IBOutlet.




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   6
Actions
• Actions are methods that are declared with a
  special return type, IBAction, which tells
  Interface Builder that this method can be
  triggered by a control in a nib file.




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   7
User Interface




Eng. Abdulrazzaq Alnajjar      iabdulrazzaq@outlook.com   8
Buttons and Action Method
1)      Object library
2)      Round Rect Button.(Drag)
3)      View (Drop)
4)      Edit the button’s title.
5)      Show the Assistant Editor.




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   9
Buttons and Action Method
6) Control-dragging to source code




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   10
Buttons and Action Method
7) Connection: Action, Name: buttonPressed,
   Press connect.




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   11
Buttons and Action Method
8) Header file should now look like this:




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   12
Buttons and Action Method
9) Impelementation file added a method stub




Eng. Abdulrazzaq Alnajjar   iabdulrazzaq@outlook.com   13
Label and Outlet
• Adding outlet to label




Eng. Abdulrazzaq Alnajjar       iabdulrazzaq@outlook.com   14
Label and Outlet
• header file after adding outlet




Eng. Abdulrazzaq Alnajjar       iabdulrazzaq@outlook.com   15
Action Method

                                                                  Take the title of the button




                                                      Put the title in a string



                             Equal the string to the label


Eng. Abdulrazzaq Alnajjar         iabdulrazzaq@outlook.com                                 16
Application Delegate
• Objects that take responsibility for doing
  certain tasks on behalf of another object.
• Every iOS application has one, and only one.




Eng. Abdulrazzaq Alnajjar         iabdulrazzaq@outlook.com   17
AppDelegate.h File




Eng. Abdulrazzaq Alnajjar        iabdulrazzaq@outlook.com   18
AppDelegate.m File




Eng. Abdulrazzaq Alnajjar        iabdulrazzaq@outlook.com   19
AppDelegate.m File




Eng. Abdulrazzaq Alnajjar        iabdulrazzaq@outlook.com   20
AppDelegate.m File




Eng. Abdulrazzaq Alnajjar        iabdulrazzaq@outlook.com   21

More Related Content

What's hot

Modern Functional Fluent ColdFusion REST Apis
Modern Functional Fluent ColdFusion REST ApisModern Functional Fluent ColdFusion REST Apis
Modern Functional Fluent ColdFusion REST ApisOrtus Solutions, Corp
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The FutureTracy Lee
 
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIOJumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIOJosh Cypher
 
[GeekTalk#2] Takaaki Mizuno - Api Url Design
[GeekTalk#2] Takaaki Mizuno - Api Url Design[GeekTalk#2] Takaaki Mizuno - Api Url Design
[GeekTalk#2] Takaaki Mizuno - Api Url DesignNexus FrontierTech
 
Validation for APIs in Laravel 4
Validation for APIs in Laravel 4Validation for APIs in Laravel 4
Validation for APIs in Laravel 4Kirk Bushell
 
Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NETWyn B. Van Devanter
 
Integration of plagiarism checker in odoo
Integration of plagiarism checker in odooIntegration of plagiarism checker in odoo
Integration of plagiarism checker in odooCeline George
 
Selenium tests, the Object Oriented way
Selenium tests, the Object Oriented waySelenium tests, the Object Oriented way
Selenium tests, the Object Oriented wayimalittletester
 
Angular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William LiebenbergAngular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William LiebenbergWilliam Liebenberg
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
Creating a server side web app
Creating a server side web appCreating a server side web app
Creating a server side web appjeremyk23
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Vaugham Hong - Embedding JavaScript V8
Vaugham Hong - Embedding JavaScript V8Vaugham Hong - Embedding JavaScript V8
Vaugham Hong - Embedding JavaScript V8Allen Pike
 
A Debugging Adventure: Journey through Ember.js Glue
A Debugging Adventure: Journey through Ember.js GlueA Debugging Adventure: Journey through Ember.js Glue
A Debugging Adventure: Journey through Ember.js GlueMike North
 
Social Sharing With IFTTT (If This Then That)
Social Sharing With IFTTT (If This Then That)Social Sharing With IFTTT (If This Then That)
Social Sharing With IFTTT (If This Then That)Zero Point Development
 

What's hot (19)

Modern Functional Fluent ColdFusion REST Apis
Modern Functional Fluent ColdFusion REST ApisModern Functional Fluent ColdFusion REST Apis
Modern Functional Fluent ColdFusion REST Apis
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
 
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIOJumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
 
Graph QL + Swift
Graph QL + SwiftGraph QL + Swift
Graph QL + Swift
 
[GeekTalk#2] Takaaki Mizuno - Api Url Design
[GeekTalk#2] Takaaki Mizuno - Api Url Design[GeekTalk#2] Takaaki Mizuno - Api Url Design
[GeekTalk#2] Takaaki Mizuno - Api Url Design
 
Validation for APIs in Laravel 4
Validation for APIs in Laravel 4Validation for APIs in Laravel 4
Validation for APIs in Laravel 4
 
Functional UI Testing
Functional UI TestingFunctional UI Testing
Functional UI Testing
 
Automated Acceptance Tests in .NET
Automated Acceptance Tests in .NETAutomated Acceptance Tests in .NET
Automated Acceptance Tests in .NET
 
Integration of plagiarism checker in odoo
Integration of plagiarism checker in odooIntegration of plagiarism checker in odoo
Integration of plagiarism checker in odoo
 
Selenium tests, the Object Oriented way
Selenium tests, the Object Oriented waySelenium tests, the Object Oriented way
Selenium tests, the Object Oriented way
 
Angular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William LiebenbergAngular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William Liebenberg
 
SpecFlow for Agile Teams
SpecFlow for Agile TeamsSpecFlow for Agile Teams
SpecFlow for Agile Teams
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
MeteorJS Session
MeteorJS SessionMeteorJS Session
MeteorJS Session
 
Creating a server side web app
Creating a server side web appCreating a server side web app
Creating a server side web app
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Vaugham Hong - Embedding JavaScript V8
Vaugham Hong - Embedding JavaScript V8Vaugham Hong - Embedding JavaScript V8
Vaugham Hong - Embedding JavaScript V8
 
A Debugging Adventure: Journey through Ember.js Glue
A Debugging Adventure: Journey through Ember.js GlueA Debugging Adventure: Journey through Ember.js Glue
A Debugging Adventure: Journey through Ember.js Glue
 
Social Sharing With IFTTT (If This Then That)
Social Sharing With IFTTT (If This Then That)Social Sharing With IFTTT (If This Then That)
Social Sharing With IFTTT (If This Then That)
 

Viewers also liked

Viewers also liked (18)

TSI culture
TSI cultureTSI culture
TSI culture
 
Theory praxis nexus
Theory praxis nexusTheory praxis nexus
Theory praxis nexus
 
In search we trust
In search we trustIn search we trust
In search we trust
 
Swot analysis
Swot analysisSwot analysis
Swot analysis
 
BOMDAS-SADMOB
BOMDAS-SADMOBBOMDAS-SADMOB
BOMDAS-SADMOB
 
Digital literacy wanderley
Digital literacy   wanderleyDigital literacy   wanderley
Digital literacy wanderley
 
Forces
ForcesForces
Forces
 
Beginning iOS6 Development CH02 Using Xcode
Beginning iOS6 Development CH02 Using XcodeBeginning iOS6 Development CH02 Using Xcode
Beginning iOS6 Development CH02 Using Xcode
 
Swimming pools lesson 1
Swimming pools lesson 1Swimming pools lesson 1
Swimming pools lesson 1
 
Ret 1
Ret 1Ret 1
Ret 1
 
Beginning iOS6 Development CH04 More User Interface Fun
Beginning iOS6 Development CH04 More User Interface FunBeginning iOS6 Development CH04 More User Interface Fun
Beginning iOS6 Development CH04 More User Interface Fun
 
Beginning iOS6 Development CH06 Multiview Applications
Beginning iOS6 Development CH06 Multiview ApplicationsBeginning iOS6 Development CH06 Multiview Applications
Beginning iOS6 Development CH06 Multiview Applications
 
Topic & Conclusion Sentence Tutorial
Topic & Conclusion Sentence TutorialTopic & Conclusion Sentence Tutorial
Topic & Conclusion Sentence Tutorial
 
Noun Groups
Noun GroupsNoun Groups
Noun Groups
 
Faberlic 03 2012_akcenti
Faberlic 03 2012_akcentiFaberlic 03 2012_akcenti
Faberlic 03 2012_akcenti
 
Faberlic 04 2012_akcenti_lv
Faberlic 04 2012_akcenti_lvFaberlic 04 2012_akcenti_lv
Faberlic 04 2012_akcenti_lv
 
El marketingmix
El marketingmixEl marketingmix
El marketingmix
 
Power aulas
Power  aulas Power  aulas
Power aulas
 

Similar to Beginning iOS6 Development CH03 Handlling Basic Interaction

Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners WorkshopSathish VJ
 
Say hello world with angular 5
Say hello world with angular 5Say hello world with angular 5
Say hello world with angular 5Abhishek Mallick
 
JavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io PresentationJavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io Presentationmanolitto
 
Ankor Presentation @ JavaOne San Francisco September 2014
Ankor Presentation @ JavaOne San Francisco September 2014Ankor Presentation @ JavaOne San Francisco September 2014
Ankor Presentation @ JavaOne San Francisco September 2014manolitto
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps QuicklyGil Irizarry
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
01 startoff angularjs
01 startoff angularjs01 startoff angularjs
01 startoff angularjsErhwen Kuo
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJSInfragistics
 
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1Rich Helton
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...Azilen Technologies Pvt. Ltd.
 
Oracle Application Developmenr Framework
Oracle Application Developmenr FrameworkOracle Application Developmenr Framework
Oracle Application Developmenr FrameworkGurpreet singh
 
Advanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksAdvanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksJeremy Likness
 
Alloy Simple App Demonstration
Alloy Simple App DemonstrationAlloy Simple App Demonstration
Alloy Simple App DemonstrationAaron Saunders
 

Similar to Beginning iOS6 Development CH03 Handlling Basic Interaction (20)

Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 
Angular IO
Angular IOAngular IO
Angular IO
 
Say hello world with angular 5
Say hello world with angular 5Say hello world with angular 5
Say hello world with angular 5
 
JavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io PresentationJavaLand 2014 - Ankor.io Presentation
JavaLand 2014 - Ankor.io Presentation
 
Synergis University 2014- iLogic Do's and Don'ts
Synergis University 2014- iLogic Do's and Don'tsSynergis University 2014- iLogic Do's and Don'ts
Synergis University 2014- iLogic Do's and Don'ts
 
Ankor Presentation @ JavaOne San Francisco September 2014
Ankor Presentation @ JavaOne San Francisco September 2014Ankor Presentation @ JavaOne San Francisco September 2014
Ankor Presentation @ JavaOne San Francisco September 2014
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Angular js
Angular jsAngular js
Angular js
 
01 startoff angularjs
01 startoff angularjs01 startoff angularjs
01 startoff angularjs
 
Step by Step - AngularJS
Step by Step - AngularJSStep by Step - AngularJS
Step by Step - AngularJS
 
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
 
Dependency Injection with Apex
Dependency Injection with ApexDependency Injection with Apex
Dependency Injection with Apex
 
Oracle Application Developmenr Framework
Oracle Application Developmenr FrameworkOracle Application Developmenr Framework
Oracle Application Developmenr Framework
 
Advanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksAdvanced AngularJS Tips and Tricks
Advanced AngularJS Tips and Tricks
 
Alloy Simple App Demonstration
Alloy Simple App DemonstrationAlloy Simple App Demonstration
Alloy Simple App Demonstration
 

Recently uploaded

Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 

Recently uploaded (20)

LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 

Beginning iOS6 Development CH03 Handlling Basic Interaction

  • 1. Handling Basic Interaction Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 1
  • 2. The Model-View-Controller Paradigm • Model-View-Controller (MVC) is a very logical way of dividing the code that makes up a GUI- based application. • The MVC pattern divides all functionality into three distinct categories: – Model: The classes that hold your application’s data. – View: Made up of the windows, controls, and other elements that the user can see and interact with. – Controller: The code that binds together the model and view. It contains the application logic that decides how to handle the user’s inputs. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 2
  • 3. Looking at the View Controller • The Button Fun folder should contain four source code files (the ones that end in .h or .m) and a single nib file. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 3
  • 4. Looking at the View Controller • The controller class called BIDViewController is responsible for managing our application’s view. • contents of the BIDViewController header file: Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 4
  • 5. Outlets and Actions • A controller class can refer to objects in a nib file by using a special kind of property called an outlet. • interface objects in nib file can be set up to trigger special methods in controller class. These special methods are known as action methods. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 5
  • 6. Outlets • Outlets are special Objective-C class properties that are declared using the keyword IBOutlet. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 6
  • 7. Actions • Actions are methods that are declared with a special return type, IBAction, which tells Interface Builder that this method can be triggered by a control in a nib file. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 7
  • 8. User Interface Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 8
  • 9. Buttons and Action Method 1) Object library 2) Round Rect Button.(Drag) 3) View (Drop) 4) Edit the button’s title. 5) Show the Assistant Editor. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 9
  • 10. Buttons and Action Method 6) Control-dragging to source code Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 10
  • 11. Buttons and Action Method 7) Connection: Action, Name: buttonPressed, Press connect. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 11
  • 12. Buttons and Action Method 8) Header file should now look like this: Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 12
  • 13. Buttons and Action Method 9) Impelementation file added a method stub Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 13
  • 14. Label and Outlet • Adding outlet to label Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 14
  • 15. Label and Outlet • header file after adding outlet Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 15
  • 16. Action Method Take the title of the button Put the title in a string Equal the string to the label Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 16
  • 17. Application Delegate • Objects that take responsibility for doing certain tasks on behalf of another object. • Every iOS application has one, and only one. Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 17
  • 18. AppDelegate.h File Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 18
  • 19. AppDelegate.m File Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 19
  • 20. AppDelegate.m File Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 20
  • 21. AppDelegate.m File Eng. Abdulrazzaq Alnajjar iabdulrazzaq@outlook.com 21