فهرست منبع

MediaCategoryViewController: Update EditToolbar actions dynamically

In the case where the user imported media files when there
wasn't any and the view was in edit mode. The edit toolbar actions
wasn't updated dynamically.

Indeed the user had to go out and back to the edit mode to have the
toolbar updated.

This will make sure that the toolbar is updated dynamically.
Soomin Lee 5 سال پیش
والد
کامیت
4e6181d19c
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 6 - 0
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -173,6 +173,12 @@ class MediaCategoryViewController: UICollectionViewController, UISearchBarDelega
         if !isSearching {
             popViewIfNecessary()
         }
+
+        if isEditing {
+            if let editToolbar = tabBarController?.editToolBar() {
+                editToolbar.updateEditToolbar(for: model)
+            }
+        }
     }
 
     @available(*, unavailable)