SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
CoconutKit
Samuel Défago,     le studio
Cocoaheads — December 2012
Who am I?
• iOS developer at          le studio
  (www.hortis.ch)
• Mail: defagos (at) gmail (dot) com
• Twitter: @defagos
• Blog: http://subjective-objective-
  c.blogspot.com/
• Open-source: https://github.com/defagos
What is CoconutKit?

• Open source project
• A library, not a framework
• Collection of useful and robust
  components
• Supports ARC and non-ARC projects
• Compatible with iOS 4, 5 and 6
Brief history

• July 2010 — Birth
• August 2011 — First public release 1.0
• October 2011 — Softshake event
• November 2012 — Version 2.0
My goals

• Eliminate cumbersome tasks
• Provide robust components
• Fill system framework gaps
• Keep components easy to use ...
• ... and documented
• Have fun!
Why you should use it?

• Spend more time on your application
• Spend less time on debugging
• Create more robust applications
• Create beautiful applications more easily
• Write better code
Links

• Official github page (https://github.com/
  defagos/CoconutKit)
• Wiki (https://github.com/defagos/
  CoconutKit/wiki)
• Binaries (https://github.com/defagos/
  CoconutKit/downloads)
Adding to a project
• Easy to integrate (~ 2 minutes)
• Easy to update
• Two methods
 • Binaries (.staticframework)
 • Cocoapods (https://github.com/
    CocoaPods/CocoaPods)
Components (1)

• View controller containers & API
• Animations
• Dynamic localization
• Core Data extensions
• Controls (label, cursor, text field, etc.)
Components (2)

• Easy view and cell instantiation from nibs
• Lightweight logger
• And more!
Containers
• High-quality containers
 • Composition (placeholder VC)
 • Navigation (stack controller)
• Custom CA transitions
• Storyboard support
• Compatible with UIKit containers
Placeholder
• Embed one or several VCs into another




   Example 1                        Example 2
        -setInsetViewController:atIndex:
Stack
  • Push / pop view controllers



    -pushViewController:withTransitionClass:animated:
              -popViewController:animated:

-insertViewController:atIndex:withTransitionClass:animated:
          -removeViewControllerAtIndex:animated:
Stack
Autorotation
• Use iOS 6 methods for all
  HLSViewController subclasses

• autorotationMode container property
 • Available for CoconutKit containers...
 • ... and for UIKit ones (no more
    subclassing)
Why CoconutKit
      containers?
• Easily change interface and transitions
• Cleanly separate your code
• Manage complex VC hierarchies easily
• Circumvent UIKit limitations (e.g. modal,
  3D flip animations)
• API to create your own containers
Animations
• Create in a declarative way
• Combine UIView and CA animations
• Pause and resume, cancel
• Set start time and delay, loop, repeat count
• Play with duration / instantaneously
• Correct behavior when app sent to the
  background
[self.listAnimation playAnimated:YES];
[self.listAnimation reverseAnimation] playAnimated:YES];
Localization


• Change localization at runtime
• nib localization without outlets
- (void)localize
  {
    [super localize];

      // View controller localization code
  }




[NSBundle setLocalization:@”en”]    [NSBundle setLocalization:@”ar”]
LS/Country    of    residence
                                      ULS/Country    of    residence
                                      LLS/Country    of    residence
                                      CLS/Country    of    residence




Strings file
              Pays   de   résidence
              PAYS   DE   RESIDENCE
              pays   de   résidence
              Pays   De   Résidence
Core Data extensions

• Managed object context (MOC) stack
• Validation done right
• Text field bindings
MOC stack



       context-free methods
Validation

• Validations written once
• Called separately or globally
• Error-chaining done right
Text field bindings

• Bind text field to underlying model object
  field




• Optional formatter
Label



• Vertical alignment
• Font size adjustment even for nbrLines >= 2
Cursor
And more!

• Search bar
• Alert view done right
• Slideshows (cross-fade, Ken Burns, ribbon)
• Text field moving to avoid being hidden by
  the keyboard
And more!
Thanks for your
  attention!
Questions?

Contenu connexe

Tendances

Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails DeploymentAlan Hecht
 
Amazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKAAmazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKA崇之 清水
 
iOS UI debugging
iOS UI debuggingiOS UI debugging
iOS UI debuggingdavidolesch
 
Amazon DynamoDB by Aswin
Amazon DynamoDB by AswinAmazon DynamoDB by Aswin
Amazon DynamoDB by AswinAgate Studio
 

Tendances (9)

Dev-Friendly Ops
Dev-Friendly OpsDev-Friendly Ops
Dev-Friendly Ops
 
CloudKit
CloudKitCloudKit
CloudKit
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails Deployment
 
[Start] Playing
[Start] Playing[Start] Playing
[Start] Playing
 
RavenDB in the wild
RavenDB in the wildRavenDB in the wild
RavenDB in the wild
 
Amazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKAAmazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKA
 
iOS UI debugging
iOS UI debuggingiOS UI debugging
iOS UI debugging
 
Amazon DynamoDB by Aswin
Amazon DynamoDB by AswinAmazon DynamoDB by Aswin
Amazon DynamoDB by Aswin
 
Sinatra
SinatraSinatra
Sinatra
 

Similaire à CoconutKit

Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017Stefano Bonetta
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersNiko Neugebauer
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018David Stockton
 
Cappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkCappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkAndreas Korth
 
SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!Ben Steinhauser
 
The Wix Microservice Stack
The Wix Microservice StackThe Wix Microservice Stack
The Wix Microservice StackTomer Gabel
 
MJ Berends talk from AWS Chicago Summit
MJ Berends talk from AWS Chicago SummitMJ Berends talk from AWS Chicago Summit
MJ Berends talk from AWS Chicago SummitAWS Chicago
 
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & ContainersKangaroot
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfAlfresco Software
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfAlfresco Software
 
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
 MJ Berends talk - Women & Non-Binary Focused Intro to AWS MJ Berends talk - Women & Non-Binary Focused Intro to AWS
MJ Berends talk - Women & Non-Binary Focused Intro to AWSAWS Chicago
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...seleniumconf
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel RidingChristian Posta
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's ArchitectureTony Tam
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellEugene Fedorenko
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsFabian Jakobs
 
iOS Development: What's New
iOS Development: What's NewiOS Development: What's New
iOS Development: What's NewNascentDigital
 

Similaire à CoconutKit (20)

Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & Developers
 
Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018Kubernetes Manchester - 6th December 2018
Kubernetes Manchester - 6th December 2018
 
Cappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkCappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application Framework
 
SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!SharePoint 2014: Where to save my data, for devs!
SharePoint 2014: Where to save my data, for devs!
 
The Wix Microservice Stack
The Wix Microservice StackThe Wix Microservice Stack
The Wix Microservice Stack
 
MJ Berends talk from AWS Chicago Summit
MJ Berends talk from AWS Chicago SummitMJ Berends talk from AWS Chicago Summit
MJ Berends talk from AWS Chicago Summit
 
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring SurfPLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
 
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
 MJ Berends talk - Women & Non-Binary Focused Intro to AWS MJ Berends talk - Women & Non-Binary Focused Intro to AWS
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's Architecture
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
From 0 to syncing
From 0 to syncingFrom 0 to syncing
From 0 to syncing
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
Into The Box 2023 Keynote Day 1
Into The Box 2023 Keynote Day 1Into The Box 2023 Keynote Day 1
Into The Box 2023 Keynote Day 1
 
iOS Development: What's New
iOS Development: What's NewiOS Development: What's New
iOS Development: What's New
 

Dernier

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

CoconutKit

  • 1. CoconutKit Samuel Défago, le studio Cocoaheads — December 2012
  • 2. Who am I? • iOS developer at le studio (www.hortis.ch) • Mail: defagos (at) gmail (dot) com • Twitter: @defagos • Blog: http://subjective-objective- c.blogspot.com/ • Open-source: https://github.com/defagos
  • 3. What is CoconutKit? • Open source project • A library, not a framework • Collection of useful and robust components • Supports ARC and non-ARC projects • Compatible with iOS 4, 5 and 6
  • 4. Brief history • July 2010 — Birth • August 2011 — First public release 1.0 • October 2011 — Softshake event • November 2012 — Version 2.0
  • 5. My goals • Eliminate cumbersome tasks • Provide robust components • Fill system framework gaps • Keep components easy to use ... • ... and documented • Have fun!
  • 6. Why you should use it? • Spend more time on your application • Spend less time on debugging • Create more robust applications • Create beautiful applications more easily • Write better code
  • 7. Links • Official github page (https://github.com/ defagos/CoconutKit) • Wiki (https://github.com/defagos/ CoconutKit/wiki) • Binaries (https://github.com/defagos/ CoconutKit/downloads)
  • 8. Adding to a project • Easy to integrate (~ 2 minutes) • Easy to update • Two methods • Binaries (.staticframework) • Cocoapods (https://github.com/ CocoaPods/CocoaPods)
  • 9. Components (1) • View controller containers & API • Animations • Dynamic localization • Core Data extensions • Controls (label, cursor, text field, etc.)
  • 10. Components (2) • Easy view and cell instantiation from nibs • Lightweight logger • And more!
  • 11. Containers • High-quality containers • Composition (placeholder VC) • Navigation (stack controller) • Custom CA transitions • Storyboard support • Compatible with UIKit containers
  • 12. Placeholder • Embed one or several VCs into another Example 1 Example 2 -setInsetViewController:atIndex:
  • 13. Stack • Push / pop view controllers -pushViewController:withTransitionClass:animated: -popViewController:animated: -insertViewController:atIndex:withTransitionClass:animated: -removeViewControllerAtIndex:animated:
  • 14. Stack
  • 15. Autorotation • Use iOS 6 methods for all HLSViewController subclasses • autorotationMode container property • Available for CoconutKit containers... • ... and for UIKit ones (no more subclassing)
  • 16. Why CoconutKit containers? • Easily change interface and transitions • Cleanly separate your code • Manage complex VC hierarchies easily • Circumvent UIKit limitations (e.g. modal, 3D flip animations) • API to create your own containers
  • 17. Animations • Create in a declarative way • Combine UIView and CA animations • Pause and resume, cancel • Set start time and delay, loop, repeat count • Play with duration / instantaneously • Correct behavior when app sent to the background
  • 19. Localization • Change localization at runtime • nib localization without outlets
  • 20. - (void)localize { [super localize]; // View controller localization code } [NSBundle setLocalization:@”en”] [NSBundle setLocalization:@”ar”]
  • 21. LS/Country of residence ULS/Country of residence LLS/Country of residence CLS/Country of residence Strings file Pays de résidence PAYS DE RESIDENCE pays de résidence Pays De Résidence
  • 22. Core Data extensions • Managed object context (MOC) stack • Validation done right • Text field bindings
  • 23. MOC stack context-free methods
  • 24. Validation • Validations written once • Called separately or globally • Error-chaining done right
  • 25. Text field bindings • Bind text field to underlying model object field • Optional formatter
  • 26. Label • Vertical alignment • Font size adjustment even for nbrLines >= 2
  • 28. And more! • Search bar • Alert view done right • Slideshows (cross-fade, Ken Burns, ribbon) • Text field moving to avoid being hidden by the keyboard
  • 30. Thanks for your attention!