Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit b75923e

Browse files
committed
Merge branch 'release/0.8.0'
2 parents 14a3c73 + 3f0e107 commit b75923e

14 files changed

+65
-823
lines changed

Example/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- WPMediaPicker (0.7.3)
2+
- WPMediaPicker (0.8.0)
33

44
DEPENDENCIES:
55
- WPMediaPicker (from `../`)
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
99
:path: ../
1010

1111
SPEC CHECKSUMS:
12-
WPMediaPicker: 6bbce465f5a5c071267ae28bdf31d0fd6e109721
12+
WPMediaPicker: cc2e022caf5cfd1f3c517c794aa5e3a81e065b05
1313

1414
COCOAPODS: 0.39.0

Example/WPMediaPicker.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@
471471
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
472472
GCC_WARN_UNUSED_FUNCTION = YES;
473473
GCC_WARN_UNUSED_VARIABLE = YES;
474-
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
474+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
475475
ONLY_ACTIVE_ARCH = YES;
476476
SDKROOT = iphoneos;
477477
TARGETED_DEVICE_FAMILY = "1,2";
@@ -504,7 +504,7 @@
504504
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
505505
GCC_WARN_UNUSED_FUNCTION = YES;
506506
GCC_WARN_UNUSED_VARIABLE = YES;
507-
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
507+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
508508
SDKROOT = iphoneos;
509509
TARGETED_DEVICE_FAMILY = "1,2";
510510
VALIDATE_PRODUCT = YES;

Example/WPMediaPicker/DemoViewController.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ - (void)viewDidLoad
3232
[self.tableView registerClass:[WPMediaGroupTableViewCell class] forCellReuseIdentifier:NSStringFromClass([WPMediaGroupTableViewCell class])];
3333
self.options = @{
3434
MediaPickerOptionsShowMostRecentFirst:@(YES),
35-
MediaPickerOptionsUsePhotosLibrary:@(YES),
3635
MediaPickerOptionsShowCameraCapture:@(YES),
3736
MediaPickerOptionsAllowMultipleSelection:@(YES)
3837
};
@@ -115,12 +114,12 @@ - (void) showPicker:(id) sender
115114
WPMediaPickerViewController *mediaPicker = [[WPMediaPickerViewController alloc] init];
116115
mediaPicker.delegate = self;
117116
mediaPicker.showMostRecentFirst = [self.options[MediaPickerOptionsShowMostRecentFirst] boolValue];
118-
if ([self.options[MediaPickerOptionsUsePhotosLibrary] boolValue]){
119-
self.customDataSource = [[WPPHAssetDataSource alloc] init];
120-
mediaPicker.dataSource = self.customDataSource;
121-
}
122117
mediaPicker.allowCaptureOfMedia = [self.options[MediaPickerOptionsShowCameraCapture] boolValue];
123118
mediaPicker.allowMultipleSelection = [self.options[MediaPickerOptionsAllowMultipleSelection] boolValue];
119+
mediaPicker.modalPresentationStyle = UIModalPresentationPopover;
120+
UIPopoverPresentationController *ppc = mediaPicker.popoverPresentationController;
121+
ppc.barButtonItem = sender;
122+
124123
[self presentViewController:mediaPicker animated:YES completion:nil];
125124
}
126125

Example/WPMediaPicker/OptionsViewController.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import UIKit;
22

33
extern NSString const *MediaPickerOptionsShowMostRecentFirst;
4-
extern NSString const *MediaPickerOptionsUsePhotosLibrary;
54
extern NSString const *MediaPickerOptionsShowCameraCapture;
65
extern NSString const *MediaPickerOptionsAllowMultipleSelection;
76

Example/WPMediaPicker/OptionsViewController.m

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
typedef NS_ENUM(NSInteger, OptionsViewControllerCell){
99
OptionsViewControllerCellShowMostRecentFirst,
10-
OptionsViewControllerCellUsePhotosLibrary,
1110
OptionsViewControllerCellShowCameraCapture,
1211
OptionsViewControllerCellAllowMultipleSelection,
1312
OptionsViewControllerCellTotal
@@ -16,7 +15,6 @@ typedef NS_ENUM(NSInteger, OptionsViewControllerCell){
1615
@interface OptionsViewController ()
1716

1817
@property (nonatomic, strong) UITableViewCell *showMostRecentFirstCell;
19-
@property (nonatomic, strong) UITableViewCell *usePhotosLibraryCell;
2018
@property (nonatomic, strong) UITableViewCell *showCameraCaptureCell;
2119
@property (nonatomic, strong) UITableViewCell *allowMultipleSelectionCell;
2220

@@ -38,11 +36,6 @@ - (void)viewDidLoad
3836
((UISwitch *)self.showMostRecentFirstCell.accessoryView).on = [self.options[MediaPickerOptionsShowMostRecentFirst] boolValue];
3937
self.showMostRecentFirstCell.textLabel.text = @"Show Most Recent First";
4038

41-
self.usePhotosLibraryCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
42-
self.usePhotosLibraryCell.accessoryView = [[UISwitch alloc] init];
43-
((UISwitch *)self.usePhotosLibraryCell.accessoryView).on = [self.options[MediaPickerOptionsUsePhotosLibrary] boolValue];
44-
self.usePhotosLibraryCell.textLabel.text = @"Use Photos Library (iOS 8 Only)";
45-
4639
self.showCameraCaptureCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
4740
self.showCameraCaptureCell.accessoryView = [[UISwitch alloc] init];
4841
((UISwitch *)self.showCameraCaptureCell.accessoryView).on = [self.options[MediaPickerOptionsShowCameraCapture] boolValue];
@@ -73,9 +66,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
7366
case OptionsViewControllerCellShowMostRecentFirst:
7467
return self.showMostRecentFirstCell;
7568
break;
76-
case OptionsViewControllerCellUsePhotosLibrary:
77-
return self.usePhotosLibraryCell;
78-
break;
7969
case OptionsViewControllerCellShowCameraCapture:
8070
return self.showCameraCaptureCell;
8171
break;
@@ -94,7 +84,6 @@ - (void) done:(id) sender
9484
id<OptionsViewControllerDelegate> delegate = self.delegate;
9585
NSDictionary *newOptions = @{
9686
MediaPickerOptionsShowMostRecentFirst:@(((UISwitch *)self.showMostRecentFirstCell.accessoryView).on),
97-
MediaPickerOptionsUsePhotosLibrary:@(((UISwitch *)self.usePhotosLibraryCell.accessoryView).on),
9887
MediaPickerOptionsShowCameraCapture:@(((UISwitch *)self.showCameraCaptureCell.accessoryView).on),
9988
MediaPickerOptionsAllowMultipleSelection:@(((UISwitch *)self.allowMultipleSelectionCell.accessoryView).on)
10089
};

Pod/Classes/WPALAssetDataSource.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)