77
88typedef 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 };
0 commit comments