What is the Swift equivalent for the following expression?
@property (strong, nonatomic) NSMutableArray *assets;
cell.imageView.image = [UIImage imageWithCGImage:[[self.assets objectAtIndex:indexPath.row] thumbnail]];
I tried:
private var assets: [AnyObject]
cell.imageView.image = UIImage(CGImage: self.assets[indexPath.row].thumbnail())
But this gives the error:
Missing argument for parameter 'inBundle' in call
Edit: self.assets
has objects from the following expression:
ALAssetsGroupEnumerationResultsBlock assetsEnumerationBlock = ^(ALAsset *result, NSUInteger index, BOOL *stop) {
if (result) {
[self.assets insertObject:result atIndex:0];
}
};