Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix for Camera Albums order #28

Merged
merged 1 commit into from about 1 year ago

2 participants

Leonardo Parro Jr jvanmetre
Leonardo Parro Jr

Fix for Camera Album order. The "Camera Roll" should be displayed first in the ELCAlbumPickerController

jvanmetre jvanmetre merged commit ee98818 into from March 26, 2013
jvanmetre jvanmetre closed this March 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 28, 2012
Leonardo Parro Jr [FIX] bug fix for camera albums order 9dd2660
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 10 additions and 1 deletion. Show diff stats Hide diff stats

  1. 11  Classes/ELCAlbumPickerController.m
11  Classes/ELCAlbumPickerController.m
@@ -44,7 +44,16 @@ - (void)viewDidLoad {
44 44
                 return;
45 45
             }
46 46
             
47  
-            [self.assetGroups addObject:group];
  47
+            // added fix for camera albums order
  48
+            NSString *sGroupPropertyName = (NSString *)[group valueForProperty:ALAssetsGroupPropertyName];
  49
+            NSUInteger nType = [[group valueForProperty:ALAssetsGroupPropertyType] intValue];
  50
+            
  51
+            if ([[sGroupPropertyName lowercaseString] isEqualToString:@"camera roll"] && nType == ALAssetsGroupSavedPhotos) {
  52
+                [self.assetGroups insertObject:group atIndex:0];
  53
+            }
  54
+            else {
  55
+                [self.assetGroups addObject:group];
  56
+            }
48 57
 
49 58
             // Reload albums
50 59
             [self performSelectorOnMainThread:@selector(reloadTableView) withObject:nil waitUntilDone:YES];
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.