SlideShare une entreprise Scribd logo
1  sur  10
Delegation
 Object Messaging
What is Delegation?
Delegation is a design pattern in object-oriented
programming where an object, instead of
performing one of its stated tasks, delegates that
task to an associated helper object. It passes the
buck, so to speak (technically, an Inversion of
Responsibility).
The helper object is called the delegate. (source:
Wikepedia)
Examples: AppDelegate
• UIApplicationDelegate
 - (BOOL)application:(UIApplication
     *)application
     didFinishLaunchingWithOptions:
     (NSDictionary *)launchOptions
 -   (void)applicationWillTerminate:
     (UIApplication *)application
Examples: UITableView
• UITableViewDelegate
 - UITableViewCell *)tableView:
     (UITableView *)tableView
     cellForRowAtIndexPath:(NSIndexPath
     *)indexPath
 -   ...tableView:didDeselectRowAtIndexPath:
What Problem Does
 Delegation Solve?

  Object A   Object B
Write to File


          Object A                     Object B
        (Equipment)                 (User Interface)



                      somefile.txt
Define Pointers



            Object A                     Object B
          (Equipment)                 (User Interface)




ObjectB *myObject;
myObject = [self getSomeData:data];
App
                            Delegate
                                            Define Property




            Object A                          Object B
          (Equipment)                      (User Interface)




AppDelegate *d = [[UIApplication sharedApplication] delegate];
d.someString = ...
App
                      Delegate
                                  Define Delegate




          Object A                  Object B
        (Equipment)              (User Interface)


• Create Delegate Object • Helper App
• Defines Protocols       • Delegate of Object A
  - List of methods      • Implements Protocol
Demo


• Build a Program using Delegation

Contenu connexe

En vedette

Image Digitization with Scanning Technology
Image Digitization with Scanning TechnologyImage Digitization with Scanning Technology
Image Digitization with Scanning TechnologyRachabodin Suwannakanthi
 
VietRees_Newsletter_56_Tuan1_Thang11
VietRees_Newsletter_56_Tuan1_Thang11VietRees_Newsletter_56_Tuan1_Thang11
VietRees_Newsletter_56_Tuan1_Thang11internationalvr
 
1 plan financiero proyecto emprendedor (1)
1 plan financiero proyecto emprendedor (1)1 plan financiero proyecto emprendedor (1)
1 plan financiero proyecto emprendedor (1)mariogomezprieto
 
Curiculum Mod Presentation
Curiculum Mod PresentationCuriculum Mod Presentation
Curiculum Mod PresentationSteve Kashdan
 
VietRees_Newsletter_38_Week1_Month07_Year08
VietRees_Newsletter_38_Week1_Month07_Year08VietRees_Newsletter_38_Week1_Month07_Year08
VietRees_Newsletter_38_Week1_Month07_Year08internationalvr
 
Invitation Autumn
Invitation AutumnInvitation Autumn
Invitation Autumnguestbf0dbb
 
Your First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim GatosYour First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim GatosJim Gatos
 
VietnamRealEstate_E-Directory_VN_Q3_2008
VietnamRealEstate_E-Directory_VN_Q3_2008VietnamRealEstate_E-Directory_VN_Q3_2008
VietnamRealEstate_E-Directory_VN_Q3_2008internationalvr
 
Protokol IPv6
Protokol IPv6Protokol IPv6
Protokol IPv6idnats
 
United Nations Tom Nies Keynote
United Nations Tom Nies KeynoteUnited Nations Tom Nies Keynote
United Nations Tom Nies KeynoteDale Wolf
 
VietRees_Newsletter_34_Tuan1_Thang06
VietRees_Newsletter_34_Tuan1_Thang06VietRees_Newsletter_34_Tuan1_Thang06
VietRees_Newsletter_34_Tuan1_Thang06internationalvr
 
Virunga Mountain Gorillas
Virunga Mountain GorillasVirunga Mountain Gorillas
Virunga Mountain GorillasLiz Weaver
 
Maalem Imen Kairouan01
Maalem Imen Kairouan01Maalem Imen Kairouan01
Maalem Imen Kairouan01guest2c3715
 
Baking day pre nursery 2012
Baking day pre nursery 2012Baking day pre nursery 2012
Baking day pre nursery 2012mariogomezprieto
 

En vedette (20)

Personal Digital Archives Development
Personal Digital Archives DevelopmentPersonal Digital Archives Development
Personal Digital Archives Development
 
Image Digitization with Scanning Technology
Image Digitization with Scanning TechnologyImage Digitization with Scanning Technology
Image Digitization with Scanning Technology
 
VietRees_Newsletter_56_Tuan1_Thang11
VietRees_Newsletter_56_Tuan1_Thang11VietRees_Newsletter_56_Tuan1_Thang11
VietRees_Newsletter_56_Tuan1_Thang11
 
Perl basics for Pentesters
Perl basics for PentestersPerl basics for Pentesters
Perl basics for Pentesters
 
1 plan financiero proyecto emprendedor (1)
1 plan financiero proyecto emprendedor (1)1 plan financiero proyecto emprendedor (1)
1 plan financiero proyecto emprendedor (1)
 
Pantone fcr-sp2010f
Pantone fcr-sp2010fPantone fcr-sp2010f
Pantone fcr-sp2010f
 
Blue Eye
Blue EyeBlue Eye
Blue Eye
 
Curiculum Mod Presentation
Curiculum Mod PresentationCuriculum Mod Presentation
Curiculum Mod Presentation
 
How’S Your Memory
How’S Your MemoryHow’S Your Memory
How’S Your Memory
 
VietRees_Newsletter_38_Week1_Month07_Year08
VietRees_Newsletter_38_Week1_Month07_Year08VietRees_Newsletter_38_Week1_Month07_Year08
VietRees_Newsletter_38_Week1_Month07_Year08
 
Invitation Autumn
Invitation AutumnInvitation Autumn
Invitation Autumn
 
Your First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim GatosYour First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim Gatos
 
VietnamRealEstate_E-Directory_VN_Q3_2008
VietnamRealEstate_E-Directory_VN_Q3_2008VietnamRealEstate_E-Directory_VN_Q3_2008
VietnamRealEstate_E-Directory_VN_Q3_2008
 
Protokol IPv6
Protokol IPv6Protokol IPv6
Protokol IPv6
 
United Nations Tom Nies Keynote
United Nations Tom Nies KeynoteUnited Nations Tom Nies Keynote
United Nations Tom Nies Keynote
 
VietRees_Newsletter_34_Tuan1_Thang06
VietRees_Newsletter_34_Tuan1_Thang06VietRees_Newsletter_34_Tuan1_Thang06
VietRees_Newsletter_34_Tuan1_Thang06
 
Virunga Mountain Gorillas
Virunga Mountain GorillasVirunga Mountain Gorillas
Virunga Mountain Gorillas
 
Maalem Imen Kairouan01
Maalem Imen Kairouan01Maalem Imen Kairouan01
Maalem Imen Kairouan01
 
Baking day pre nursery 2012
Baking day pre nursery 2012Baking day pre nursery 2012
Baking day pre nursery 2012
 
Lechuzas
LechuzasLechuzas
Lechuzas
 

Similaire à Delegation

Debot android debugging library
Debot android debugging libraryDebot android debugging library
Debot android debugging libraryTomoaki Imai
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOSMake School
 
Ios development 2
Ios development 2Ios development 2
Ios development 2elnaqah
 
Azure functions
Azure functionsAzure functions
Azure functions명신 김
 
KOIN for dependency Injection
KOIN for dependency InjectionKOIN for dependency Injection
KOIN for dependency InjectionKirill Rozov
 
Implementing Data Visualization Apps on iOS Devices
Implementing Data Visualization Apps on iOS DevicesImplementing Data Visualization Apps on iOS Devices
Implementing Data Visualization Apps on iOS DevicesDouglass Turner
 
New to native? Getting Started With iOS Development
New to native?   Getting Started With iOS DevelopmentNew to native?   Getting Started With iOS Development
New to native? Getting Started With iOS DevelopmentGeoffrey Goetz
 
Mobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sMobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sAdam Wilson
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2Calvin Cheng
 
Converting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile CloudConverting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile CloudRoger Brinkley
 
Android architecture
Android architecture Android architecture
Android architecture Trong-An Bui
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyUna Daly
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesAhsanul Karim
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift LeedsPeter Friese
 
Mobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileMobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileKonstantin Loginov
 

Similaire à Delegation (20)

Debot android debugging library
Debot android debugging libraryDebot android debugging library
Debot android debugging library
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
 
Ios development 2
Ios development 2Ios development 2
Ios development 2
 
Azure functions
Azure functionsAzure functions
Azure functions
 
KOIN for dependency Injection
KOIN for dependency InjectionKOIN for dependency Injection
KOIN for dependency Injection
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
 
Implementing Data Visualization Apps on iOS Devices
Implementing Data Visualization Apps on iOS DevicesImplementing Data Visualization Apps on iOS Devices
Implementing Data Visualization Apps on iOS Devices
 
New to native? Getting Started With iOS Development
New to native?   Getting Started With iOS DevelopmentNew to native?   Getting Started With iOS Development
New to native? Getting Started With iOS Development
 
Mobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’sMobile Application Development with JUCE and Native API’s
Mobile Application Development with JUCE and Native API’s
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Converting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile CloudConverting Your Mobile App to the Mobile Cloud
Converting Your Mobile App to the Mobile Cloud
 
Android architecture
Android architecture Android architecture
Android architecture
 
Code camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una DalyCode camp 2011 Getting Started with IOS, Una Daly
Code camp 2011 Getting Started with IOS, Una Daly
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
Day 3: Getting Active Through Activities
Day 3: Getting Active Through ActivitiesDay 3: Getting Active Through Activities
Day 3: Getting Active Through Activities
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 
iOS
iOSiOS
iOS
 
Mobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileMobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve Mobile
 

Dernier

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Dernier (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Delegation

  • 2. What is Delegation? Delegation is a design pattern in object-oriented programming where an object, instead of performing one of its stated tasks, delegates that task to an associated helper object. It passes the buck, so to speak (technically, an Inversion of Responsibility). The helper object is called the delegate. (source: Wikepedia)
  • 3. Examples: AppDelegate • UIApplicationDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions - (void)applicationWillTerminate: (UIApplication *)application
  • 4. Examples: UITableView • UITableViewDelegate - UITableViewCell *)tableView: (UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - ...tableView:didDeselectRowAtIndexPath:
  • 5. What Problem Does Delegation Solve? Object A Object B
  • 6. Write to File Object A Object B (Equipment) (User Interface) somefile.txt
  • 7. Define Pointers Object A Object B (Equipment) (User Interface) ObjectB *myObject; myObject = [self getSomeData:data];
  • 8. App Delegate Define Property Object A Object B (Equipment) (User Interface) AppDelegate *d = [[UIApplication sharedApplication] delegate]; d.someString = ...
  • 9. App Delegate Define Delegate Object A Object B (Equipment) (User Interface) • Create Delegate Object • Helper App • Defines Protocols • Delegate of Object A - List of methods • Implements Protocol
  • 10. Demo • Build a Program using Delegation

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n