diff --git a/Classes/ELCImagePicker/ELCAlbumPickerController.m b/Classes/ELCImagePicker/ELCAlbumPickerController.m index e375a0a..296f98e 100755 --- a/Classes/ELCImagePicker/ELCAlbumPickerController.m +++ b/Classes/ELCImagePicker/ELCAlbumPickerController.m @@ -18,6 +18,11 @@ @interface ELCAlbumPickerController () @implementation ELCAlbumPickerController +- (NSInteger)maximumImagesCount +{ + return self.parent.maximumImagesCount; +} + //Using auto synthesizers #pragma mark - @@ -34,7 +39,7 @@ - (void)viewDidLoad [self.navigationItem setRightBarButtonItem:cancelButton]; NSMutableArray *tempArray = [[NSMutableArray alloc] init]; - self.assetGroups = tempArray; + self.assetGroups = nil; ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init]; self.library = assetLibrary; @@ -42,64 +47,113 @@ - (void)viewDidLoad // Load Albums into assetGroups dispatch_async(dispatch_get_main_queue(), ^ { - @autoreleasepool { - - // Group enumerator Block - void (^assetGroupEnumerator)(ALAssetsGroup *, BOOL *) = ^(ALAssetsGroup *group, BOOL *stop) - { - if (group == nil) { - return; - } - - // added fix for camera albums order - NSString *sGroupPropertyName = (NSString *)[group valueForProperty:ALAssetsGroupPropertyName]; - NSUInteger nType = [[group valueForProperty:ALAssetsGroupPropertyType] intValue]; - - if ([[sGroupPropertyName lowercaseString] isEqualToString:@"camera roll"] && nType == ALAssetsGroupSavedPhotos) { - [self.assetGroups insertObject:group atIndex:0]; - } - else { - [self.assetGroups addObject:group]; - } - - // Reload albums - [self performSelectorOnMainThread:@selector(reloadTableView) withObject:nil waitUntilDone:YES]; - }; - - // Group Enumerator Failure Block - void (^assetGroupEnumberatorFailure)(NSError *) = ^(NSError *error) { - - if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusDenied) { - NSString *errorMessage = NSLocalizedString(@"This app does not have access to your photos or videos. You can enable access in Privacy Settings.", nil); - [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Access Denied", nil) message:errorMessage delegate:nil cancelButtonTitle:NSLocalizedString(@"Ok", nil) otherButtonTitles:nil] show]; - - } else { - NSString *errorMessage = [NSString stringWithFormat:@"Album Error: %@ - %@", [error localizedDescription], [error localizedRecoverySuggestion]]; - [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) message:errorMessage delegate:nil cancelButtonTitle:NSLocalizedString(@"Ok", nil) otherButtonTitles:nil] show]; - } - - [self.navigationItem setTitle:nil]; - NSLog(@"A problem occured %@", [error description]); - }; - - // Enumerate Albums - [self.library enumerateGroupsWithTypes:ALAssetsGroupAll - usingBlock:assetGroupEnumerator - failureBlock:assetGroupEnumberatorFailure]; - - } + @autoreleasepool { + + // Group enumerator Block + void (^assetGroupEnumerator)(ALAssetsGroup *, BOOL *) = ^(ALAssetsGroup *group, BOOL *stop) + { + if (group) { + [tempArray addObject:group]; + } else { + // finished adding groups. + // now sort them and put them into the table + NSDictionary *typeOrderReplacements = @{ + @(ALAssetsGroupSavedPhotos) : @(-3), + @(ALAssetsGroupPhotoStream) : @(-2), + @(ALAssetsGroupEvent) : @(-1) + }; + [tempArray sortUsingComparator:^NSComparisonResult(ALAssetsGroup *group1, ALAssetsGroup *group2) { + NSNumber *originalType1 = [group1 valueForProperty:ALAssetsGroupPropertyType]; + NSNumber *type1 = typeOrderReplacements[originalType1]; + if (!type1) { + type1 = originalType1; + } + NSNumber *originalType2 = [group2 valueForProperty:ALAssetsGroupPropertyType]; + NSNumber *type2 = typeOrderReplacements[originalType2]; + if (!type2) { + type2 = originalType2; + } + // first, we sort by album type (SavedPhotos, PhotoStream, Event, Library, Album, Faces, unknown, ...) + NSComparisonResult result = [type1 compare:type2]; + if (result == NSOrderedSame) { + // second, we sort by album name. + // When sorting PhotoStream albums, we prefix the name with underscore when having "stream" in it; + // this should put the main photo stream to the top (assuming it is named something like "stream" in the current language). + NSString *name1 = [group1 valueForProperty:ALAssetsGroupPropertyName]; + if ([originalType1 intValue] == ALAssetsGroupPhotoStream && [name1 rangeOfString:@"stream" options:NSCaseInsensitiveSearch].location != NSNotFound) { + name1 = [@"_" stringByAppendingString:name1]; + } + NSString *name2 = [group2 valueForProperty:ALAssetsGroupPropertyName]; + if ([originalType2 intValue] == ALAssetsGroupPhotoStream && [name2 rangeOfString:@"stream" options:NSCaseInsensitiveSearch].location != NSNotFound) { + name2 = [@"_" stringByAppendingString:name2]; + } + result = [name1 caseInsensitiveCompare:name2]; + if (result == NSOrderedSame) { + // the last fallback is to sort by pointer comparison. + if (group1 < group2) { + result = NSOrderedAscending; + } else if (group1 > group2) { + result = NSOrderedDescending; + } + } + } + return result; + }]; + + self.assetGroups = tempArray; + // Reload albums + [self performSelectorOnMainThread:@selector(reloadTableView) withObject:nil waitUntilDone:YES]; + } + }; + + // Group Enumerator Failure Block + void (^assetGroupEnumberatorFailure)(NSError *) = ^(NSError *error) { + + if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusDenied) { + NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; + NSString *errorMessage = [NSString stringWithFormat:NSLocalizedString(@"This app does not have access to your photos or videos. You can enable access in Privacy Settings.", nil), appName]; + UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Access Denied", nil) + message:errorMessage + preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", nil) + style:UIAlertActionStyleCancel + handler:nil]]; + [self presentViewController:alert animated:YES completion:nil]; + } else { + NSString *errorMessage = [NSString stringWithFormat:@"Album Error: %@ - %@", [error localizedDescription], [error localizedRecoverySuggestion]]; + UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Error", nil) + message:errorMessage + preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", nil) + style:UIAlertActionStyleCancel + handler:nil]]; + [self presentViewController:alert animated:YES completion:nil]; + } + + [self.navigationItem setTitle:nil]; + NSLog(@"A problem occured %@", [error description]); + }; + + // Enumerate Albums + [self.library enumerateGroupsWithTypes:ALAssetsGroupAll + usingBlock:assetGroupEnumerator + failureBlock:assetGroupEnumberatorFailure]; + + } }); - + } -- (void)viewWillAppear:(BOOL)animated { - +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadTableView) name:ALAssetsLibraryChangedNotification object:nil]; [self.tableView reloadData]; } -- (void)viewWillDisappear:(BOOL)animated { - +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; [[NSNotificationCenter defaultCenter] removeObserver:self name:ALAssetsLibraryChangedNotification object:nil]; } diff --git a/Classes/ELCImagePicker/ELCAssetCell.m b/Classes/ELCImagePicker/ELCAssetCell.m index d456b11..cf02120 100755 --- a/Classes/ELCImagePicker/ELCAssetCell.m +++ b/Classes/ELCImagePicker/ELCAssetCell.m @@ -10,6 +10,8 @@ #import "ELCConsole.h" #import "ELCOverlayImageView.h" +#import "ELCStreetspotrOverlay.h" // custom drawn overlay + @interface ELCAssetCell () @property (nonatomic, strong) NSArray *rowAssets; @@ -69,7 +71,7 @@ - (void)setAssets:(NSArray *)assets overlayView.labIndex.text = [NSString stringWithFormat:@"%d", asset.index + 1]; } else { if (overlayImage == nil) { - overlayImage = [UIImage imageNamed:@"Overlay.png"]; + overlayImage = [UIImage streetspotrELCOverlayImage]; } ELCOverlayImageView *overlayView = [[ELCOverlayImageView alloc] initWithImage:overlayImage]; [_overlayViewArray addObject:overlayView]; @@ -96,20 +98,23 @@ - (void)cellTapped:(UITapGestureRecognizer *)tapRecognizer for (int i = 0; i < [_rowAssets count]; ++i) { if (CGRectContainsPoint(frame, point)) { - ELCAsset *asset = [_rowAssets objectAtIndex:i]; - asset.selected = !asset.selected; - ELCOverlayImageView *overlayView = [_overlayViewArray objectAtIndex:i]; - overlayView.hidden = !asset.selected; - if (asset.selected) { - asset.index = [[ELCConsole mainConsole] numOfSelectedElements]; - [overlayView setIndex:asset.index+1]; - [[ELCConsole mainConsole] addIndex:asset.index]; - } - else - { - int lastElement = [[ELCConsole mainConsole] numOfSelectedElements] - 1; - [[ELCConsole mainConsole] removeIndex:lastElement]; - } + ELCAsset *asset = [_rowAssets objectAtIndex:i]; + BOOL oldSelected = asset.selected; + asset.selected = !asset.selected; + if (!asset.selected != !oldSelected) { // need this test; elsewise we may accidently remove a still used index from ELCConsole + ELCOverlayImageView *overlayView = [_overlayViewArray objectAtIndex:i]; + overlayView.hidden = !asset.selected; + if (asset.selected) { + asset.index = [[ELCConsole mainConsole] numOfSelectedElements]; + [overlayView setIndex:asset.index+1]; + [[ELCConsole mainConsole] addIndex:asset.index]; + } + else + { + int lastElement = [[ELCConsole mainConsole] numOfSelectedElements] - 1; + [[ELCConsole mainConsole] removeIndex:lastElement]; + } + } break; } frame.origin.x = frame.origin.x + frame.size.width + 4; diff --git a/Classes/ELCImagePicker/ELCAssetSelectionDelegate.h b/Classes/ELCImagePicker/ELCAssetSelectionDelegate.h index b8dba83..88690d7 100755 --- a/Classes/ELCImagePicker/ELCAssetSelectionDelegate.h +++ b/Classes/ELCImagePicker/ELCAssetSelectionDelegate.h @@ -12,6 +12,8 @@ @protocol ELCAssetSelectionDelegate +@property (nonatomic, readonly) NSInteger maximumImagesCount; + - (void)selectedAssets:(NSArray *)assets; - (BOOL)shouldSelectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCount; - (BOOL)shouldDeselectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCount; diff --git a/Classes/ELCImagePicker/ELCAssetTablePicker.m b/Classes/ELCImagePicker/ELCAssetTablePicker.m index 24830be..3f13af7 100755 --- a/Classes/ELCImagePicker/ELCAssetTablePicker.m +++ b/Classes/ELCImagePicker/ELCAssetTablePicker.m @@ -34,12 +34,17 @@ - (id)init - (void)viewDidLoad { + [super viewDidLoad]; + [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; [self.tableView setAllowsSelection:NO]; NSMutableArray *tempArray = [[NSMutableArray alloc] init]; self.elcAssets = tempArray; - + + self.singleSelection = (self.parent.maximumImagesCount == 1); + self.immediateReturn = (self.parent.maximumImagesCount == 1); + if (self.immediateReturn) { } else { @@ -67,16 +72,18 @@ - (void)viewWillDisappear:(BOOL)animated [[NSNotificationCenter defaultCenter] removeObserver:self name:ALAssetsLibraryChangedNotification object:nil]; } -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation -{ - return YES; +- (BOOL)shouldAutorotate { + return YES; } -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation +- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - self.columns = self.view.bounds.size.width / 80; - [self.tableView reloadData]; + [coordinator animateAlongsideTransition:nil completion:^(id _Nonnull context) { +#pragma unused(context) + self.columns = self.view.bounds.size.width / 80; + [self.tableView reloadData]; + }]; + [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; } - (void)preparePhotos diff --git a/Classes/ELCImagePicker/ELCConsole.m b/Classes/ELCImagePicker/ELCConsole.m index cc6e700..3db22e2 100644 --- a/Classes/ELCImagePicker/ELCConsole.m +++ b/Classes/ELCImagePicker/ELCConsole.m @@ -66,7 +66,7 @@ - (int)currIndex - (int)numOfSelectedElements { - return [myIndex count]; + return (int)[myIndex count]; } @end diff --git a/Classes/ELCImagePicker/ELCImagePickerController.h b/Classes/ELCImagePicker/ELCImagePickerController.h index 53d90af..12324ae 100755 --- a/Classes/ELCImagePicker/ELCImagePickerController.h +++ b/Classes/ELCImagePicker/ELCImagePickerController.h @@ -9,6 +9,8 @@ #import #import "ELCAssetSelectionDelegate.h" +extern NSString *const ELCIImagePickerControllerAsset; // added by Streetspotr; key for returned ALAsset + @class ELCImagePickerController; @class ELCAlbumPickerController; @@ -18,7 +20,7 @@ * Called with the picker the images were selected from, as well as an array of dictionary's * containing keys for ALAssetPropertyLocation, ALAssetPropertyType, * UIImagePickerControllerOriginalImage, and UIImagePickerControllerReferenceURL. - * @param picker + * @param picker The ELCImagePickerController instance * @param info An NSArray containing dictionary's with the key UIImagePickerControllerOriginalImage, which is a rotated, and sized for the screen 'default representation' of the image selected. If you want to get the original image, use the UIImagePickerControllerReferenceURL key. */ - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info; diff --git a/Classes/ELCImagePicker/ELCImagePickerController.m b/Classes/ELCImagePicker/ELCImagePickerController.m index b7f3eda..7d01d62 100755 --- a/Classes/ELCImagePicker/ELCImagePickerController.m +++ b/Classes/ELCImagePicker/ELCImagePickerController.m @@ -15,6 +15,8 @@ #import #import "ELCConsole.h" +NSString *const ELCIImagePickerControllerAsset = @"ELCIImagePickerControllerAsset"; // added by Streetspotr; key for returned ALAsset + @implementation ELCImagePickerController //Using auto synthesizers @@ -71,13 +73,15 @@ - (BOOL)shouldSelectAsset:(ELCAsset *)asset previousCount:(NSUInteger)previousCo { BOOL shouldSelect = previousCount < self.maximumImagesCount; if (!shouldSelect) { - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"Only %d photos please!", nil), self.maximumImagesCount]; - NSString *message = [NSString stringWithFormat:NSLocalizedString(@"You can only send %d photos at a time.", nil), self.maximumImagesCount]; - [[[UIAlertView alloc] initWithTitle:title - message:message - delegate:nil - cancelButtonTitle:nil - otherButtonTitles:NSLocalizedString(@"Okay", nil), nil] show]; + NSString *title = [NSString stringWithFormat:NSLocalizedString(@"Only %d photos please!", nil), (int)self.maximumImagesCount]; + NSString *message = [NSString stringWithFormat:NSLocalizedString(@"You can only send %d photos at a time.", nil), (int)self.maximumImagesCount]; + UIAlertController *alert = [UIAlertController alertControllerWithTitle:title + message:message + preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Okay", nil) + style:UIAlertActionStyleDefault + handler:nil]]; + [self presentViewController:alert animated:YES completion:nil]; } return shouldSelect; } @@ -118,7 +122,7 @@ - (void)selectedAssets:(NSArray *)assets if (_returnsOriginalImage) { imgRef = [assetRep fullResolutionImage]; - orientation = [assetRep orientation]; + orientation = (UIImageOrientation)[assetRep orientation]; } else { imgRef = [assetRep fullScreenImage]; } @@ -126,10 +130,12 @@ - (void)selectedAssets:(NSArray *)assets scale:1.0f orientation:orientation]; [workingDictionary setObject:img forKey:UIImagePickerControllerOriginalImage]; - } + } else { + [workingDictionary setObject:asset forKey:ELCIImagePickerControllerAsset]; // added by Streetspotr, because getting Asset from URL of photo stream images is not possible for some reason + } [workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:UIImagePickerControllerReferenceURL]; - + [returnArray addObject:workingDictionary]; } @@ -141,13 +147,9 @@ - (void)selectedAssets:(NSArray *)assets } } -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation +- (BOOL)shouldAutorotate { - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - return YES; - } else { - return toInterfaceOrientation != UIInterfaceOrientationPortraitUpsideDown; - } + return YES; } - (BOOL)onOrder diff --git a/Classes/ELCImagePicker/ELCOverlayImageView.m b/Classes/ELCImagePicker/ELCOverlayImageView.m index f7b9b76..34abbb1 100644 --- a/Classes/ELCImagePicker/ELCOverlayImageView.m +++ b/Classes/ELCImagePicker/ELCOverlayImageView.m @@ -8,6 +8,11 @@ #import "ELCOverlayImageView.h" #import "ELCConsole.h" + +@interface UIColor (Streetspotr) ++ (UIColor *)streetspotrTurquois; +@end + @implementation ELCOverlayImageView - (id)initWithFrame:(CGRect)frame @@ -38,7 +43,7 @@ - (id)initWithImage:(UIImage *)image if ([[ELCConsole mainConsole] onOrder]) { self.labIndex = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 16, 16)]; - self.labIndex.backgroundColor = [UIColor redColor]; + self.labIndex.backgroundColor = [UIColor streetspotrTurquois]; self.labIndex.clipsToBounds = YES; self.labIndex.textAlignment = NSTextAlignmentCenter; self.labIndex.textColor = [UIColor whiteColor]; diff --git a/Classes/ELCImagePicker/ELCStreetspotrOverlay.h b/Classes/ELCImagePicker/ELCStreetspotrOverlay.h new file mode 100644 index 0000000..26e96c9 --- /dev/null +++ b/Classes/ELCImagePicker/ELCStreetspotrOverlay.h @@ -0,0 +1,15 @@ +// +// ELCStreetspotrOverlay.h +// Streetspotr +// +// Created by Manfred Schwind on 03.02.15. +// Copyright (c) 2015 Streetspotr. All rights reserved. +// + +#import + +@interface UIImage (ELCStreetspotrOverlay) + ++ (UIImage *)streetspotrELCOverlayImage; + +@end diff --git a/Classes/ELCImagePicker/ELCStreetspotrOverlay.m b/Classes/ELCImagePicker/ELCStreetspotrOverlay.m new file mode 100644 index 0000000..bc04b7b --- /dev/null +++ b/Classes/ELCImagePicker/ELCStreetspotrOverlay.m @@ -0,0 +1,83 @@ +// +// ELCStreetspotrOverlay.m +// Streetspotr +// +// Created by Manfred Schwind on 03.02.15. +// Copyright (c) 2015 Streetspotr. All rights reserved. +// + +#import "ELCStreetspotrOverlay.h" + +@interface UIColor (Streetspotr) ++ (UIColor *)streetspotrTurquois; +@end + +@implementation UIImage (ELCStreetspotrOverlay) + ++ (UIImage *)streetspotrELCOverlayImage +{ + static __weak UIImage *cachedImage = nil; + if (cachedImage) { + return cachedImage; + } + + UIGraphicsBeginImageContextWithOptions(CGSizeMake(75.0f, 75.0f), NO, 0.0f); + + { // ********* BEGIN PaintCode code + + //// General Declarations + CGContextRef context = UIGraphicsGetCurrentContext(); + + //// Color Declarations + UIColor* overlayColor = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 0.3]; + UIColor* tintColor = [UIColor streetspotrTurquois]; // MODIFIED! + + //// Shadow Declarations + UIColor* shadow = [[UIColor blackColor] colorWithAlphaComponent: 0.3]; + CGSize shadowOffset = CGSizeMake(0.1, 2.1); + CGFloat shadowBlurRadius = 2.5; + + //// Abstracted Attributes + NSString* checkContent = @"\uf00c"; // MODIFIED! + + + //// Rectangle Drawing + UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRect: CGRectMake(0, 0, 75, 75)]; + [overlayColor setFill]; + [rectanglePath fill]; + + + //// OuterOval Drawing + UIBezierPath* outerOvalPath = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(46, 46, 24, 24)]; + CGContextSaveGState(context); + CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor); + [[UIColor whiteColor] setFill]; + [outerOvalPath fill]; + CGContextRestoreGState(context); + + + + //// InnerOval Drawing + UIBezierPath* innerOvalPath = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(48, 48, 20, 20)]; + [tintColor setFill]; + [innerOvalPath fill]; + + + //// Check Drawing + CGRect checkRect = CGRectMake(46, 51, 24, 19); + NSMutableParagraphStyle* checkStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; + [checkStyle setAlignment: NSTextAlignmentCenter]; + + NSDictionary* checkFontAttributes = @{NSFontAttributeName: [UIFont fontWithName: @"FontAwesome5Free-Solid" size: 14], NSForegroundColorAttributeName: [UIColor whiteColor], NSParagraphStyleAttributeName: checkStyle}; + + [checkContent drawInRect: checkRect withAttributes: checkFontAttributes]; + +} // ********* END PaintCode code + + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + cachedImage = image; + return image; +} + +@end diff --git a/Classes/ELCImagePicker/Resources/ELCAlbumPickerController.xib b/Classes/ELCImagePicker/Resources/ELCAlbumPickerController.xib index 4170520..340453f 100755 --- a/Classes/ELCImagePicker/Resources/ELCAlbumPickerController.xib +++ b/Classes/ELCImagePicker/Resources/ELCAlbumPickerController.xib @@ -1,374 +1,30 @@ - - - 1024 - 10F569 - 804 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 123 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 416} - - - 3 - MQA - - NO - YES - NO - - - NO - - IBCocoaTouchFramework - NO - 1 - 0 - YES - 44 - 22 - 22 - - - - - YES - - - view - - - - 5 - - - - dataSource - - - - 6 - - - - delegate - - - - 7 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 4.IBEditorWindowLastContentRect - 4.IBPluginDependency - - - YES - AlbumPickerController - UIResponder - {{329, 504}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 7 - - - - YES - - AlbumPickerController - UITableViewController - - IBProjectSource - Classes/AlbumPickerController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../ELCImagePickerDemo.xcodeproj - 3 - 123 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Classes/ELCImagePicker/Resources/ELCAssetPicker.xib b/Classes/ELCImagePicker/Resources/ELCAssetPicker.xib index 5d5e2b5..a7f23c5 100755 --- a/Classes/ELCImagePicker/Resources/ELCAssetPicker.xib +++ b/Classes/ELCImagePicker/Resources/ELCAssetPicker.xib @@ -1,435 +1,31 @@ - - - 1024 - 10F569 - 804 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 123 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - - YES - - - 268 - {320, 416} - - - 1 - MSAxIDEAA - - YES - YES - IBCocoaTouchFramework - - - {320, 416} - - - 3 - MQA - - 2 - - - - - NO - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - scrollview - - - - 7 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - YES - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 6.IBPluginDependency - 6.IBViewBoundsToFrameTransform - - - YES - AssetPicker - UIResponder - {{575, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - P4AAAL+AAAAAAAAAw88AAA - - - - - YES - - - YES - - - - - YES - - - YES - - - - 15 - - - - YES - - AssetPicker - UIViewController - - dismiss: - id - - - dismiss: - - dismiss: - id - - - - YES - - YES - parent - scrollview - selectedAssetsLabel - - - YES - id - UIScrollView - UILabel - - - - YES - - YES - parent - scrollview - selectedAssetsLabel - - - YES - - parent - id - - - scrollview - UIScrollView - - - selectedAssetsLabel - UILabel - - - - - IBProjectSource - Classes/ELCImagePickerController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../ELCImagePickerDemo.xcodeproj - 3 - 123 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Classes/ELCImagePicker/Resources/ELCAssetTablePicker.xib b/Classes/ELCImagePicker/Resources/ELCAssetTablePicker.xib index e59456c..5640962 100755 --- a/Classes/ELCImagePicker/Resources/ELCAssetTablePicker.xib +++ b/Classes/ELCImagePicker/Resources/ELCAssetTablePicker.xib @@ -1,422 +1,31 @@ - - - 1024 - 10F569 - 804 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 123 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {320, 436} - - - 3 - MQA - - YES - - NO - - IBCocoaTouchFramework - YES - 1 - 0 - YES - 44 - 22 - 22 - - - - - YES - - - view - - - - 3 - - - - dataSource - - - - 4 - - - - delegate - - - - 5 - - - - - YES - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 2 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - - - YES - AssetTablePicker - UIResponder - {{0, 526}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 5 - - - - YES - - AssetTablePicker - UITableViewController - - dismiss: - id - - - dismiss: - - dismiss: - id - - - - YES - - YES - parent - selectedAssetsLabel - - - YES - id - UILabel - - - - YES - - YES - parent - selectedAssetsLabel - - - YES - - parent - id - - - selectedAssetsLabel - UILabel - - - - - IBProjectSource - Classes/ELCImagePickerController.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UITableViewController - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITableViewController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UIPopoverController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UISplitViewController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../ELCImagePickerDemo.xcodeproj - 3 - 123 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ELCImagePickerController.podspec b/ELCImagePickerController.podspec index 89e3c3a..3297636 100644 --- a/ELCImagePickerController.podspec +++ b/ELCImagePickerController.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.source = {:git => 'https://github.com/elc/ELCImagePickerController.git', :tag => '0.2.0' } - s.platform = :ios, '6.0' + s.platform = :ios, '9.0' s.resources = 'Classes/**/*.{xib,png}' s.source_files = 'Classes/ELCImagePicker/*.{h,m}' s.framework = 'Foundation', 'UIKit', 'AssetsLibrary', 'CoreLocation' diff --git a/ELCImagePickerDemo.xcodeproj/project.pbxproj b/ELCImagePickerDemo.xcodeproj/project.pbxproj index eeecc92..12251d2 100755 --- a/ELCImagePickerDemo.xcodeproj/project.pbxproj +++ b/ELCImagePickerDemo.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ 2899E5220DE3E06400AC0155 /* ELCImagePickerDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* ELCImagePickerDemoViewController.xib */; }; 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 28D7ACF80DDB3853001CB0EB /* ELCImagePickerDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* ELCImagePickerDemoViewController.m */; }; + 3C98FF82251E009F00ED8EC8 /* ELCStreetspotrOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C98FF80251E009E00ED8EC8 /* ELCStreetspotrOverlay.m */; }; 4AAFDA62194840F20020FCC4 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AAFDA61194840F20020FCC4 /* MobileCoreServices.framework */; }; 83C6BC9714476B280064D71D /* elc-ios-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C6BC9514476B280064D71D /* elc-ios-icon@2x.png */; }; 83C6BC9814476B280064D71D /* elc-ios-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 83C6BC9614476B280064D71D /* elc-ios-icon.png */; }; @@ -60,6 +61,8 @@ 28D7ACF70DDB3853001CB0EB /* ELCImagePickerDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELCImagePickerDemoViewController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* ELCImagePickerDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELCImagePickerDemo_Prefix.pch; sourceTree = ""; }; + 3C98FF80251E009E00ED8EC8 /* ELCStreetspotrOverlay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELCStreetspotrOverlay.m; sourceTree = ""; }; + 3C98FF81251E009F00ED8EC8 /* ELCStreetspotrOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELCStreetspotrOverlay.h; sourceTree = ""; }; 4AAFDA61194840F20020FCC4 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 5FAEB088190A3FA9002D73C4 /* ELCImagePickerHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ELCImagePickerHeader.h; sourceTree = ""; }; 83C6BC9514476B280064D71D /* elc-ios-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "elc-ios-icon@2x.png"; sourceTree = ""; }; @@ -186,6 +189,8 @@ F1DF783F196FA475003524A2 /* ELCConsole.m */, F1DF7840196FA475003524A2 /* ELCOverlayImageView.h */, F1DF7841196FA475003524A2 /* ELCOverlayImageView.m */, + 3C98FF81251E009F00ED8EC8 /* ELCStreetspotrOverlay.h */, + 3C98FF80251E009E00ED8EC8 /* ELCStreetspotrOverlay.m */, ); path = ELCImagePicker; sourceTree = ""; @@ -266,6 +271,7 @@ F1DF7842196FA475003524A2 /* ELCConsole.m in Sources */, 28D7ACF80DDB3853001CB0EB /* ELCImagePickerDemoViewController.m in Sources */, 1A2C100517026CF0004FAFA0 /* ELCAssetTablePicker.m in Sources */, + 3C98FF82251E009F00ED8EC8 /* ELCStreetspotrOverlay.m in Sources */, 1A2C100617026CF0004FAFA0 /* ELCImagePickerController.m in Sources */, 1A2C100717026CF0004FAFA0 /* ELCAlbumPickerController.m in Sources */, 1A2C100817026CF0004FAFA0 /* ELCAsset.m in Sources */,