title: Swift converting between UInt and Int
body: <p>I have the following methods</p>
  
  <pre><code>var photos = [MWPhoto] = [MWPhoto]()
  
  func numberOfPhotosInPhotoBrowser(photoBrowser: MWPhotoBrowser!) -&gt; UInt {
  
      return self.photos.count
  }
  
  func photoBrowser(photoBrowser: MWPhotoBrowser!, photoAtIndex index: UInt) -&gt; MWPhotoProtocol! {
  
      return self.photos[index]
  }
  </code></pre>
  
  <p>However for the first I get <code>Int is not convertible to UInt</code> (since <code>self.photos.count</code> is an <code>Int</code> </p>
  
  <p>and for the second <code>UInt is not convertible to Int</code> - since the <code>self.photos[</code> can only take an Int for its index.</p>
  
  <p>How can I correctly convert the UInt to Int and back?</p>