我正在使用 ALAssetsLibrary 来获取照片并进行显示。但我希望最新的图片在前面(这意味着按照日期时间排序)。这可能使用 ALAssetsLibrary ??如果不是可能的方法来实现那个??
ALAssetsLibrary *al = [AssetManager defaultAssetsLibrary];
[al enumerateGroupsWithTypes:ALAssetsGroupAll
usingBlock:^(ALAssetsGroup *group, BOOL *stop)
{
[group enumerateAssetsUsingBlock:^(ALAsset *asset, NSUInteger index, BOOL *stop)
{
if (asset)
{
[self.assets addObject:asset];
}
}
];
NSLog(@"first %@",self.assets);
self.assetsR=[[[self.assets reverseObjectEnumerator] allObjects] mutableCopy];
[self.collectionData reloadData];
答案 0 :(得分:0)
您可以使用http://jsfiddle.net/wQXCL/421/类
它具有onOrder属性
答案 1 :(得分:0)
尝试以下
me@myplace.com [~/scraping/fsquare]# python2.7 fsquare.py
Traceback (most recent call last):
File "fsquare.py", line 24, in <module>
auth_url = client.oauth.auth_url()
File "/home/me/scraping/fsquare/foursquare/__init__.py", line 157, in auth_url
params=parse.urlencode(params))
NameError: global name 'parse' is not defined