CoconutKitSamuel Défago,     le studioCocoaheads — December 2012
Who am I?• iOS developer at          le studio  (www.hortis.ch)• Mail: defagos (at) gmail (dot) com• Twitter: @defagos• Bl...
What is CoconutKit?• Open source project• A library, not a framework• Collection of useful and robust  components• Support...
Brief history• July 2010 — Birth• August 2011 — First public release 1.0• October 2011 — Softshake event• November 2012 — ...
My goals• Eliminate cumbersome tasks• Provide robust components• Fill system framework gaps• Keep components easy to use ....
Why you should use it?• Spend more time on your application• Spend less time on debugging• Create more robust applications...
Links• Official github page (https://github.com/  defagos/CoconutKit)• Wiki (https://github.com/defagos/  CoconutKit/wiki)•...
Adding to a project• Easy to integrate (~ 2 minutes)• Easy to update• Two methods • Binaries (.staticframework) • Cocoapod...
Components (1)• View controller containers & API• Animations• Dynamic localization• Core Data extensions• Controls (label,...
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•...
Placeholder• Embed one or several VCs into another   Example 1                        Example 2        -setInsetViewContro...
Stack  • Push / pop view controllers    -pushViewController:withTransitionClass:animated:              -popViewController:...
Stack
Autorotation• Use iOS 6 methods for all  HLSViewController subclasses• autorotationMode container property • Available for...
Why CoconutKit      containers?• Easily change interface and transitions• Cleanly separate your code• Manage complex VC hi...
Animations• Create in a declarative way• Combine UIView and CA animations• Pause and resume, cancel• Set start time and de...
[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”]    [...
LS/Country    of    residence                                      ULS/Country    of    residence                         ...
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 ...
And more!
Thanks for your  attention!
Questions?
Upcoming SlideShare
Loading in …5
×

CoconutKit

1,542 views
1,433 views

Published on

My talk about CoconutKit 2.0, held at Cocoheads Switzerland in December 2012

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,542
On SlideShare
0
From Embeds
0
Number of Embeds
17
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

CoconutKit

  1. 1. CoconutKitSamuel Défago, le studioCocoaheads — December 2012
  2. 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. 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. 4. Brief history• July 2010 — Birth• August 2011 — First public release 1.0• October 2011 — Softshake event• November 2012 — Version 2.0
  5. 5. My goals• Eliminate cumbersome tasks• Provide robust components• Fill system framework gaps• Keep components easy to use ...• ... and documented• Have fun!
  6. 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. 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. 8. Adding to a project• Easy to integrate (~ 2 minutes)• Easy to update• Two methods • Binaries (.staticframework) • Cocoapods (https://github.com/ CocoaPods/CocoaPods)
  9. 9. Components (1)• View controller containers & API• Animations• Dynamic localization• Core Data extensions• Controls (label, cursor, text field, etc.)
  10. 10. Components (2)• Easy view and cell instantiation from nibs• Lightweight logger• And more!
  11. 11. Containers• High-quality containers • Composition (placeholder VC) • Navigation (stack controller)• Custom CA transitions• Storyboard support• Compatible with UIKit containers
  12. 12. Placeholder• Embed one or several VCs into another Example 1 Example 2 -setInsetViewController:atIndex:
  13. 13. Stack • Push / pop view controllers -pushViewController:withTransitionClass:animated: -popViewController:animated:-insertViewController:atIndex:withTransitionClass:animated: -removeViewControllerAtIndex:animated:
  14. 14. Stack
  15. 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. 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. 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
  18. 18. [self.listAnimation playAnimated:YES];[self.listAnimation reverseAnimation] playAnimated:YES];
  19. 19. Localization• Change localization at runtime• nib localization without outlets
  20. 20. - (void)localize { [super localize]; // View controller localization code }[NSBundle setLocalization:@”en”] [NSBundle setLocalization:@”ar”]
  21. 21. LS/Country of residence ULS/Country of residence LLS/Country of residence CLS/Country of residenceStrings file Pays de résidence PAYS DE RESIDENCE pays de résidence Pays De Résidence
  22. 22. Core Data extensions• Managed object context (MOC) stack• Validation done right• Text field bindings
  23. 23. MOC stack context-free methods
  24. 24. Validation• Validations written once• Called separately or globally• Error-chaining done right
  25. 25. Text field bindings• Bind text field to underlying model object field• Optional formatter
  26. 26. Label• Vertical alignment• Font size adjustment even for nbrLines >= 2
  27. 27. Cursor
  28. 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
  29. 29. And more!
  30. 30. Thanks for your attention!
  31. 31. Questions?

×