Permalink
Browse files

Fix for infinite loop sequence when running under iOS 5.x.

  • Loading branch information...
James Van Metre
James Van Metre committed Dec 16, 2013
1 parent ef67cf0 commit a40806688d01c60cd5d3364a52aa317ea12a7502
@@ -35,6 +35,7 @@
@property (nonatomic, weak) id<ELCImagePickerControllerDelegate> imagePickerDelegate;
@property (nonatomic, assign) NSInteger maximumImagesCount;
+- (id)initImagePicker;
- (void)cancelImagePicker;
@end
@@ -17,7 +17,7 @@ @implementation ELCImagePickerController
//Using auto synthesizers
-- (id)init
+- (id)initImagePicker
{
ELCAlbumPickerController *albumPicker = [[ELCAlbumPickerController alloc] initWithStyle:UITableViewStylePlain];
@@ -24,7 +24,7 @@ @implementation ELCImagePickerDemoViewController
- (IBAction)launchController
{
- ELCImagePickerController *elcPicker = [[ELCImagePickerController alloc] init];
+ ELCImagePickerController *elcPicker = [[ELCImagePickerController alloc] initImagePicker];
elcPicker.maximumImagesCount = 4;
elcPicker.imagePickerDelegate = self;
View
@@ -8,7 +8,7 @@ The image picker is created and displayed in a very similar manner to the `UIIma
```obj-c
// Create the image picker
-ELCImagePickerController *imagePicker = [[ELCImagePickerController alloc] init];
+ELCImagePickerController *imagePicker = [[ELCImagePickerController alloc] initImagePicker];
imagePicker.maximumImagesCount = 4; //Set the maximum number of images to select, defaults to 4
imagePicker.imagePickerDelegate = self;

0 comments on commit a408066

Please sign in to comment.