SlideShare uma empresa Scribd logo
1 de 25
Avoiding oversized
 view controllers
      in iOS

 Stewart Gleadow
 Email:
 sgleadow@thoughtworks.com

 Twitter:
 @stewgleadow
What makes a class
easy to maintain?
UIView


UIViewController


                   Model
What makes a
controller easy to
    maintain?
UIViewController

- (id)init;

-   (void)loadView;
-   (void)viewDidLoad;
-   (void)viewWillAppear:(BOOL);
-   (void)viewDidAppear:(BOOL);

- (void)viewWillDisappear:(BOOL);
- (void)viewDidDisappear: (BOOL);
- (void)viewDidUnload;

- (void)dealloc;
UIViewController

- (id)init;

-   (void)loadView;
-   (void)viewDidLoad;
-   (void)viewWillAppear:(BOOL);
-   (void)viewDidAppear:(BOOL);

- (void)viewWillDisappear:(BOOL);
- (void)viewDidDisappear: (BOOL);
- (void)viewDidUnload;

- (void)dealloc;
UIViewController

- (id)init;

-   (void)loadView;
-   (void)viewDidLoad;
-   (void)viewWillAppear:(BOOL);
-   (void)viewDidAppear:(BOOL);

- (void)viewWillDisappear:(BOOL);
- (void)viewDidDisappear: (BOOL);
- (void)viewDidUnload;

- (void)dealloc;
- (id)init;
{
  if ((self = [super init]))
  {
    // create data related objects
  }

    return self;
}

- (void)dealloc;
{
  // release any data related objects

    [super dealloc];
}
- (void)loadView;
{
  [super loadView];

    // create all your views

    // assign delegates
}

- (void)viewDidUnload;
{
  // release any view related

    [super viewDidUnload];
}
@interface MatchViewController : UIViewController

  <UITableViewDelegate,
  UITableViewDataSource,
  UIScrollViewDelegate,
  TTModelDelegate,
  ...>
Coordinated Views

       View One



       View Two




       View Three
Coordinator

- (id)init;

- (UIView *)view;
- (void)releaseView;

- (void)dealloc;
ViewController               Coordinator

- (id)init;                         - (id)init;

-   (void)loadView;                 - (UIView *)view;
-   (void)viewDidLoad;              - (void)releaseView;
-   (void)viewWillAppear:(BOOL);
-   (void)viewDidAppear:(BOOL);     - (void)dealloc;

- (void)viewWillDisappear:(BOOL);
- (void)viewDidDisappear: (BOOL);
- (void)viewDidUnload;

- (void)dealloc;
ViewController               Coordinator

- (id)init;                         - (id)init;

-   (void)loadView;                 - (UIView *)view;
-   (void)viewDidLoad;              - (void)releaseView;
-   (void)viewWillAppear:(BOOL);
-   (void)viewDidAppear:(BOOL);     - (void)dealloc;

- (void)viewWillDisappear:(BOOL);
- (void)viewDidDisappear: (BOOL);
- (void)viewDidUnload;

- (void)dealloc;
ViewController               Coordinator

- (id)init;                         - (id)init;

-   (void)loadView;                 - (UIView *)view;
-   (void)viewDidLoad;              - (void)releaseView;
-   (void)viewWillAppear:(BOOL);
-   (void)viewDidAppear:(BOOL);     - (void)dealloc;

- (void)viewWillDisappear:(BOOL);
- (void)viewDidDisappear: (BOOL);
- (void)viewDidUnload;

- (void)dealloc;
Demo
Stewart Gleadow
Email:
sgleadow@thoughtworks.com

Twitter:
@stewgleadow

Mais conteúdo relacionado

Semelhante a iOS View Coordinators

Creating Container View Controllers
Creating Container View ControllersCreating Container View Controllers
Creating Container View ControllersBob McCune
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケースKatsumi Kishikawa
 
ITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVCITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVCOrtus Solutions, Corp
 
Formacion en movilidad: Conceptos de desarrollo en iOS (III)
Formacion en movilidad: Conceptos de desarrollo en iOS (III) Formacion en movilidad: Conceptos de desarrollo en iOS (III)
Formacion en movilidad: Conceptos de desarrollo en iOS (III) Mobivery
 
Apple Templates Considered Harmful
Apple Templates Considered HarmfulApple Templates Considered Harmful
Apple Templates Considered HarmfulBrian Gesiak
 
Utilising View Controllers
Utilising View ControllersUtilising View Controllers
Utilising View Controllersdanielctull
 
Using view controllers wisely
Using view controllers wiselyUsing view controllers wisely
Using view controllers wiselydefagos
 
ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)
ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)
ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)Ontico
 
iOS: Implementing a Custom View
iOS: Implementing a Custom ViewiOS: Implementing a Custom View
iOS: Implementing a Custom ViewJussi Pohjolainen
 
View controller life cycle
View controller life cycleView controller life cycle
View controller life cycleSV.CO
 
Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019DanielJalkut
 
Building impressive layout systems with vaadin
Building impressive layout systems with vaadinBuilding impressive layout systems with vaadin
Building impressive layout systems with vaadinPeter Lehto
 
iOSインタラクションデザイン
iOSインタラクションデザインiOSインタラクションデザイン
iOSインタラクションデザインhIDDENxv
 

Semelhante a iOS View Coordinators (20)

Creating Container View Controllers
Creating Container View ControllersCreating Container View Controllers
Creating Container View Controllers
 
I os 11
I os 11I os 11
I os 11
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケース
 
NongBeer MVP Demo application
NongBeer MVP Demo applicationNongBeer MVP Demo application
NongBeer MVP Demo application
 
iOS
iOSiOS
iOS
 
ITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVCITB2016 Converting Legacy Apps into Modern MVC
ITB2016 Converting Legacy Apps into Modern MVC
 
Formacion en movilidad: Conceptos de desarrollo en iOS (III)
Formacion en movilidad: Conceptos de desarrollo en iOS (III) Formacion en movilidad: Conceptos de desarrollo en iOS (III)
Formacion en movilidad: Conceptos de desarrollo en iOS (III)
 
Apple Templates Considered Harmful
Apple Templates Considered HarmfulApple Templates Considered Harmful
Apple Templates Considered Harmful
 
Utilising View Controllers
Utilising View ControllersUtilising View Controllers
Utilising View Controllers
 
Using view controllers wisely
Using view controllers wiselyUsing view controllers wisely
Using view controllers wisely
 
ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)
ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)
ApplicationCoordinator для навигации между экранами / Павел Гуров (Avito)
 
iOS: Implementing a Custom View
iOS: Implementing a Custom ViewiOS: Implementing a Custom View
iOS: Implementing a Custom View
 
View controller life cycle
View controller life cycleView controller life cycle
View controller life cycle
 
Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019Daniel Jalkut - dotSwift 2019
Daniel Jalkut - dotSwift 2019
 
Building impressive layout systems with vaadin
Building impressive layout systems with vaadinBuilding impressive layout systems with vaadin
Building impressive layout systems with vaadin
 
iOS_Presentation
iOS_PresentationiOS_Presentation
iOS_Presentation
 
Koin
KoinKoin
Koin
 
iOSインタラクションデザイン
iOSインタラクションデザインiOSインタラクションデザイン
iOSインタラクションデザイン
 
PhotoFlipCardView
PhotoFlipCardViewPhotoFlipCardView
PhotoFlipCardView
 
Routing to components
Routing to componentsRouting to components
Routing to components
 

Mais de sgleadow

Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9sgleadow
 
Evolving for Multiple Screens
Evolving for Multiple ScreensEvolving for Multiple Screens
Evolving for Multiple Screenssgleadow
 
Mobile: more than just an app
Mobile: more than just an appMobile: more than just an app
Mobile: more than just an appsgleadow
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architecturessgleadow
 
Building mobile teams and getting a product to market
Building mobile teams and getting a product to marketBuilding mobile teams and getting a product to market
Building mobile teams and getting a product to marketsgleadow
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testingsgleadow
 
iOS app case study
iOS app case studyiOS app case study
iOS app case studysgleadow
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testingsgleadow
 
Multithreaded Data Transport
Multithreaded Data TransportMultithreaded Data Transport
Multithreaded Data Transportsgleadow
 
A few design patterns
A few design patternsA few design patterns
A few design patternssgleadow
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programmingsgleadow
 

Mais de sgleadow (11)

Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9Evolving Mobile Architectures @ Mi9
Evolving Mobile Architectures @ Mi9
 
Evolving for Multiple Screens
Evolving for Multiple ScreensEvolving for Multiple Screens
Evolving for Multiple Screens
 
Mobile: more than just an app
Mobile: more than just an appMobile: more than just an app
Mobile: more than just an app
 
Evolving Mobile Architectures
Evolving Mobile ArchitecturesEvolving Mobile Architectures
Evolving Mobile Architectures
 
Building mobile teams and getting a product to market
Building mobile teams and getting a product to marketBuilding mobile teams and getting a product to market
Building mobile teams and getting a product to market
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testing
 
iOS app case study
iOS app case studyiOS app case study
iOS app case study
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testing
 
Multithreaded Data Transport
Multithreaded Data TransportMultithreaded Data Transport
Multithreaded Data Transport
 
A few design patterns
A few design patternsA few design patterns
A few design patterns
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programming
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

iOS View Coordinators

  • 1. Avoiding oversized view controllers in iOS Stewart Gleadow Email: sgleadow@thoughtworks.com Twitter: @stewgleadow
  • 2.
  • 3. What makes a class easy to maintain?
  • 5.
  • 6. What makes a controller easy to maintain?
  • 7.
  • 8.
  • 9. UIViewController - (id)init; - (void)loadView; - (void)viewDidLoad; - (void)viewWillAppear:(BOOL); - (void)viewDidAppear:(BOOL); - (void)viewWillDisappear:(BOOL); - (void)viewDidDisappear: (BOOL); - (void)viewDidUnload; - (void)dealloc;
  • 10. UIViewController - (id)init; - (void)loadView; - (void)viewDidLoad; - (void)viewWillAppear:(BOOL); - (void)viewDidAppear:(BOOL); - (void)viewWillDisappear:(BOOL); - (void)viewDidDisappear: (BOOL); - (void)viewDidUnload; - (void)dealloc;
  • 11. UIViewController - (id)init; - (void)loadView; - (void)viewDidLoad; - (void)viewWillAppear:(BOOL); - (void)viewDidAppear:(BOOL); - (void)viewWillDisappear:(BOOL); - (void)viewDidDisappear: (BOOL); - (void)viewDidUnload; - (void)dealloc;
  • 12.
  • 13. - (id)init; { if ((self = [super init])) { // create data related objects } return self; } - (void)dealloc; { // release any data related objects [super dealloc]; }
  • 14.
  • 15. - (void)loadView; { [super loadView]; // create all your views // assign delegates } - (void)viewDidUnload; { // release any view related [super viewDidUnload]; }
  • 16.
  • 17. @interface MatchViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate, TTModelDelegate, ...>
  • 18. Coordinated Views View One View Two View Three
  • 19. Coordinator - (id)init; - (UIView *)view; - (void)releaseView; - (void)dealloc;
  • 20.
  • 21. ViewController Coordinator - (id)init; - (id)init; - (void)loadView; - (UIView *)view; - (void)viewDidLoad; - (void)releaseView; - (void)viewWillAppear:(BOOL); - (void)viewDidAppear:(BOOL); - (void)dealloc; - (void)viewWillDisappear:(BOOL); - (void)viewDidDisappear: (BOOL); - (void)viewDidUnload; - (void)dealloc;
  • 22. ViewController Coordinator - (id)init; - (id)init; - (void)loadView; - (UIView *)view; - (void)viewDidLoad; - (void)releaseView; - (void)viewWillAppear:(BOOL); - (void)viewDidAppear:(BOOL); - (void)dealloc; - (void)viewWillDisappear:(BOOL); - (void)viewDidDisappear: (BOOL); - (void)viewDidUnload; - (void)dealloc;
  • 23. ViewController Coordinator - (id)init; - (id)init; - (void)loadView; - (UIView *)view; - (void)viewDidLoad; - (void)releaseView; - (void)viewWillAppear:(BOOL); - (void)viewDidAppear:(BOOL); - (void)dealloc; - (void)viewWillDisappear:(BOOL); - (void)viewDidDisappear: (BOOL); - (void)viewDidUnload; - (void)dealloc;
  • 24. Demo

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. - small classes\n- small methods\n- single responsibility\n- not much logic, just decoupling\n
  5. - nav controller push/pop\n- low memory conditions (recycle the views)\n\n
  6. - nav controller push/pop\n- low memory conditions (recycle the views)\n\n
  7. \n
  8. \n
  9. \n
  10. \n
  11. - one UIViewController to rule them all (single responsibility?)\n- sub UIViewControllers: complicated lifecycle\n- custom UIView subclasses shouldn&amp;#x2019;t have delegate callbacks\n
  12. - automatic layout in full width horizontal\n- independent sections of the screen\n
  13. - simplified view controller\n- managed the creation of the view (holds it)\n- hides callbacks (can&amp;#x2019;t use UIView for that)\n
  14. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  15. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  16. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  17. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  18. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  19. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  20. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  21. - same object lifecycle, for delegate callbacks\n- simpler view lifecycle\n- automatic layout using stacked view\n
  22. \n
  23. \n