Thinking in Swift!

Thinking in Swift!

Swift India, Delhi Meetup

8d05c774222cd7ee18ea73005ff37a55?s=128

Ritesh Gupta

January 21, 2017
Tweet

Transcript

  1. in Swift ~ Ritesh Gupta (Swift India, Delhi Meetup)

  2. Swift is just not a syntax migration from Objective-C…

  3. Swift is not objective-c styled language…

  4. C ~> C++ Objective-C ~> Swift { imperative } {

    object oriented } { object oriented } { protocol oriented }
  5. None
  6. None
  7. None
  8. None
  9. stuck with Inheritance..

  10. None
  11. None
  12. compose everything with Protocols..

  13. UIButton UIBarButtonItem

  14. UIButton UIControl UIView

  15. UIBarButtonItem UIBarItem NSObject

  16. UIBarButtonItem UIBarItem NSObject UIButton UIControl UIView

  17. None
  18. None
  19. Entity (class, struct) vs Behaviour (protocol)

  20. UIView Framable

  21. UIImageView ImageRenderable, Framable

  22. UIButton Tappable, ImageRenderable, Framable

  23. UITableViewCell
 UICollectionViewCell Reusable, Framable

  24. UIScrollView Scrollable, Framable

  25. UITableView
 UICollectionView Listable, Scrollable, Framable

  26. UI Entities is collection of behaviours…

  27. ..computed variables, extensions, values types, immutability, functional programming, generics, enums,

    associative types/ values..
  28. thinking in protocol..

  29. None