title: Swift Extensions
body: <p>I am curious as to what is the purpose of writing extensions for a class that you can already add code?</p>
  
  <p>For example, in <a href="https://www.raywenderlich.com/121540/alamofire-tutorial-getting-started" rel="nofollow">Ray Wenderlich's AlamoFire</a> tutorial,</p>
  
  <p>He has a ViewController class, but he writes an extension for that ViewController for his Networking Functions and <code>UIImagePickerControllerDelegate</code> methods. Is the only reason he is writing extensions is for the purpose of dividing up code into logical bits?</p>
  
  <p>Is this a common practice or just personal preference?</p>