title: iOS Group Photo Library photos by categories
body: <p>In my app I am getting all photos(<code>PHAsset</code>) using this code</p>
  
  <pre><code>    PHPhotoLibrary.requestAuthorization { (status) in
          switch status {
          case .authorized:
              print("Good to proceed")
              let fetchOptions = PHFetchOptions()
              let allPhotos = PHAsset.fetchAssets(with: .image, options: fetchOptions)
              print("Found \(allPhotos.count) images")
          case .denied, .restricted:
              print("Not allowed")
          case .notDetermined:
              print("Not determined yet")
          @unknown default:
              fatalError()
          }
      }
  </code></pre>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>Can I get grouped photos by categories from Photo Library? (see image below)</li>
  <li>Can I group photos by categories in my side? (see image below)</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/7SpmD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7SpmD.jpg" alt="enter image description here"></a></p>