Code Monkey home page Code Monkey logo

dkimagepickercontroller's People

Contributors

abjurato avatar anthonymdev avatar avinpr-pgr avatar azurechen avatar crazyfanfan avatar digisplash avatar dneykov avatar dominicmdev avatar duylinh avatar eric-robinson avatar erychagov avatar gesantung avatar gregoriol avatar hunaid-hassan-confiz avatar hyouuu avatar jasonjanofsky avatar jettf avatar jlnquere avatar julianshen avatar lawicko avatar lucasromanomr avatar mspasov avatar ruberik avatar scottdelly avatar sorianog avatar vladtoader avatar yosritimraz avatar zhangao0086 avatar zrn-ns avatar zxkane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dkimagepickercontroller's Issues

Can I use this from Objective-C?

Im just finding new ImagePicker controller and I found yours is very cool one. Is there any advice to use it from obj-c ?

Thx a lot.
// sry for my bad Eng and Knowledge.

Allow selection of no photos, like Facebook application does

Right now, if I select zero photos, the select button goes away and only cancel is available.

If the user already has photos selected and would like to remove all selected photos, I'd like to be able to select zero photos and push Done. This is the current functionality in the Facebook iOS application, and I'd love to see that functionality make it's way into this library.

Thanks!

Cannot use DKAsset.fetchImageWithSize with iCloud photos (Perhaps?)

Is there a way to disallow the user from seeing and selecting iCloud photos in the photo picker? I've discovered a problem when the user selects a photo from their library that hasn't been downloaded to the device yet. I'm not 100% sure that this means the photo is from iCloud and they are only seeing a small thumbnail preview in the picker.

Below are some scenarios to help you understand how I've determined that the failing photo is from iCloud or some other off-device storage.

Test Case 01:

  1. User picks a photo that hasn't been downloaded to device yet.
  2. Eventually my code will call "fetchImageWithSize" with a bounds of w:1200.0 and h:1200.0
  3. The UIImage that is expected is "nil"

Test Case 02:

  1. First I went to the Photo library outside of my app and found a photo
  2. I zoomed into the photo and noticed a circular loading icon in the bottom right hand corner of the image - I am guessing this means the image is downloading from iCloud???
  3. User opens my app, initiates the DKPicker and selects the same photo from (1 & 2)
  4. My code will call "fetchImageWithSize" with a bounds of w:1200.0 and h:1200.0
  5. The UIImage that is expected is set correctly and is not "nil"

Everything else has been great BTW! Nice work!

Change Default Folder

Is there a way to change the default album to be displayed. That is, I want the Camera Roll to be the first thing a user sees.

Deselecting photos does not update the numbering.

If you have selected a number of photos and decide to deselect one (or more), the relative numbering of the rest of the photos does not get updated.

For example if you have selected 3 photos, and then deselect number 2, then the remaining two photos will still be numbered 1 and 3. Expected behaviour would be that number 3 would change to 2.

This also has the effect that when you then continue to select another photo, then there will be three photos with the numbers 1, 3 and 3.

Cannot get all photos?

Hi . I m facing a problem . When i selected multiple photo e.x 18 photos selected ..It return me less photo instead of all.Here is my code
let pickerController = DKImagePickerController()
var images:[UIImage] = []

pickerController.didSelectAssets = { (assets: [DKAsset]) in
print(assets.count) // This return me exact same value which i select
for asset in assets {
asset.fetchOriginalImageWithCompleteBlock({ (image, info) -> Void in
print(image) //return less images
self.images.append(image!)
print(self.images.count) //Return less images count
})
}
}
self.presentViewController(pickerController, animated: true) {}

can u help me out . Am i wrong someWhere ?

Twitter Like Implementation

Hello, Can anyone assist me in using this to create a twitter like post view controller where the image picker loads under the post option and once the image picker view is swiped up the image picker loads fully
img_1181

didSelectAssets block is called twice.

I am using DKImagePickerController with all of the default settings.

After opening the picker, I select the camera button, then take a photo. This calls the didSelectAssets block when the camera is dismissed. Then when I select the 'done' button, didSelectAssets is called again.

In my didSelectAssets block, I am appending the new images to my array, and because didSelectAssets is called twice, a copy of the photo from the camera is added to my array.

I advocate that didSelectAssets only be called once when the picker is dismissed. That way duplicates are not created if appending to an array, or resetting the array.

Suggestion, Add "Cancel" button on picker

Please add the cancel button on picker, show that user can dismiss the picker for example by mistake user open the picker and don't want to select the image. or not want to select any image then he/she able to dismiss the picker on cancel button click. I know the done button click dismiss. But as per user experience we need add the "cancel" button.

Quick Question For A Beginner

Hello, Can I just start off by saying thank you for such an incredible project. I've created something similar but far less complicated. My question is this, Is it possible to call an image picker on view did load. For the demo that you provided in VIewController at view did load I called for your show method providing the needed specifications.
I end up getting an error <DKImagePickerControllerDemo.DKImagePickerController: 0x12582ee00> on <DKImagePickerControllerDemo.ViewController: 0x124e458f0> whose view is not in the window hierarchy!. Not sure where I am going wrong
override func viewDidLoad() {
super.viewDidLoad()
showImagePickerWithAssetType(
.AllAssets,
allowMultipleType: false,
sourceType: .Photo,
allowsLandscape: true,
singleSelect: false
)

}

Crash when get the `fullScreenImage` in Xcode 6.4

invalid attempt to access <ALAssetPrivate: 0x7f8946220cd0> past the lifetime of its owning ALAssetsLibrary
fatal error: unexpectedly found nil while unwrapping an Optional value

How to solove it?

crash in iphone 6

hi
i have selected 20 images and each image size like 1.5 to 3 mb .after select 20 images it will show received memory warning and crash

How can i convert DkAssets to PHAsset

in my app i m trying to delete selected photos from camera roll . I tried a lot . But could not figure it out. I also tried to take the value from info which is "PHImageFileURLKey" and delete using PHAsset.fetchAssetsWithALAssetURLs ..But its not working..so i wanna try fetchAssetsInAssetCollection which is looking for PHAssets instead of DKAssets....Thanks

Installation Error

First off all thank you for yours working. It is really amazing.
I did all steps which you write. It looks correctly but when I want to instance DKAsset or DKImagePickerController gives me the error undefined. I researched it and when I change the shcema on my project error fix and build success but in this case application is not run. I use swift in my project.

May you share something to me about how can ı import the framework and use it correctly in swift.

Thank you so much.

Best Regards.

Getting the name of the image.

I am trying out your wonderful ImagePicker in my new project. I am allowing users to select multiple images & hence in turn,when they select the images *I want to display the user the name of the images. How can I achieve that? *

Please Allow Camera Access shows in camera view even if accepted allowing access.

For what it is worth, I'm using the version where you haven't created DKCamera, so I don't know if new versions fix this, but this is a problem I've run into. The only way to get rid of it is to close the app, reopen and then try again.

If I decide not to accept allowing access, I see the prompt again, it takes me to settings, but when I change the settings, then go back to app, the prompt is still there.

Does DKCamera fix this?

Edit: I just checked and DKCamera doesn't seem to have this fixed.

capturing video

If i want to add an option to capture a video, what changes should I make in takePicture method of DKCamera class in order to support this feature ?

Update AssetsLibrary to Photos framework, deprecated

Unfortunately I'm getting warnings left and right about how the AssetsLibrary is deprecated and certain methods need to be updated to the Photos framework; they all have to do with the originalAsset variable in the DKAsset class. Please fix this, I would but I'm new to iOS development :/

Can we have an intermediate view for Camera

Can we have an intermediate view where the picture taken from camera will be shown along with the Accept and Cancel as the available options so that the user can discard the pic if see any issue with that

Original Picture

Hello, my question is about the pic, in the example select but is a thumbnail (low quality and small), How to select the image, video original from the library or camera?

Thanks

Obj C HighQualityFormat does not return images

When using option for HighQualityFormat in Objective C, images never return.

Code as used (aSelected is array of selected images):

for (int i = 0; i < aSelected.count; i++)
{
CGSize imageSize=CGSizeMake(1153, 1153);

        PHImageRequestOptions* options = [[PHImageRequestOptions alloc] init] ;
        options.synchronous = YES;
        options.version = PHImageRequestOptionsVersionCurrent;
        options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
        options.resizeMode=PHImageRequestOptionsResizeModeFast;
        options.networkAccessAllowed = YES;

        DKImageManager *cont = [DKImageManager new];

[cont fetchImageForAsset:aSelected[i] size:imageSize options:options completeBlock:^(UIImage * imageSelected, NSDictionary * info){
[self uploadContentImage:imageSelected];
}];

keep the ratio when using fetchImageWithSize

Is there an option to detect or keep the ratio when using this size one? In that case, the size specified would be the max height and the max width for the compressed image.

For example, if I specify the size to be CGSize(width: 1200, height: 1200), the image will always be cut into 1200 * 1200 square. If the original ratio is 4:3 and 2000:1500, I'd like to have the UIImage to be 1200 * 900. Thanks!

Unable to replicate FB upload new profile pic functionality

So, this is 95% there for it. There just isn't a way to click a pic -> Go to a crop view, then crop pic.

Further, it seems like you use a custom button for the Done as the right button for Navigation bar. Why don't you use the default .Done, which looks better? A tad redundant to number the selected pics on the pics and then have the selected number on the top right as well. It doesn't look very aesthetically pleasing like that and the reason someone would use this is for it to mimic 100% the functionality they're looking for.

Anyways, just an FYI, but I'll see if I can get a crop thing going and make a pull request.

App crash when click on group button

Step to reproduce:
1. Open DKImagePickerController
2. Leave the app and open Photos app. Create or delete a album
3. Back to the application and tap on group button ==> app crash.

I can't get data from assets in new version

With the new version (3.0.0) I can't get NSData from assets... If I do this:

assets.first!.fetchImageWithSize(sender.view!.bounds.size, completeBlock: {
          (image: UIImage?) -> Void in

           if let imageToSave = image {
                   let data: NSData = UIImageJPEGRepresentation(imageToSave, 0.7) //data always nil
                    self.saveImage(data!)
        }
}

data is always nil an image never is nil... What is the problem?

Video Thumbnails

Hello,

This is not issue, just suggestion.

In system controller, there is a little camera icon and video duration bottom of the video thumbnails. Is it possible to do that with DKImagePickerController?

How to change image of first cell

Hi!

I need to change image of first cell when select DKImagePickerControllerAssetType
Image selection is one other picture and filming is another image

Select multi image!

When i select multi image at many album it got wrong number image selected.
Fix it please.

Unable to save the selected assets array

I have implemented this project via cocoa pods. I wanted to save the selected images (path) to an array and retrieve and upload in another view controller.

Failed to work out. Appreciate your help.

convert data and post image in server

i am using DKImagePickerController then i select multipal image in self.assets!
like.[<DKImagePickerControllerDemo.DKAsset: 0x7fe168e34d70>, <DKImagePickerControllerDemo.DKAsset: 0x7fe168d3c020>, <DKImagePickerControllerDemo.DKAsset: 0x7fe168d71980>]
but how to convert data and post image

It crashed

Hi,

Thanks for sharing wonderful library. I have just installed on my phone and it was crash when you choose photos only option from examples.

in DKAsset:
self.thumbnailImage = UIImage(CGImage:originalAsset.thumbnail().takeRetainedValue())

with error message "fatal error: unexpectedly found nil while unwrapping an Optional value"

Not sure what is reason but when I tried to open camera it was asking me permission but when it was allowed it was crashed again. No debug statment generated that time.

Let me know if you need more information for this issues.

Thanks
Manoj

CompleteBlock executes twice

Another issue is this method... the code inside block executes twice for each asset...

image.fetchFullScreenImageWithCompleteBlock({
        (image: UIImage?) -> Void in
       //code here executes twice for each asset
})

Problem when show more than one time the picker

I have a problem with the second and next times after first execution of picker, the problem occurs with this picker configuration:

let pickerController = DKImagePickerController()
pickerController.allowMultipleTypes = false
pickerController.assetType = .allPhotos
pickerController.singleSelect = true
pickerController.maxSelectableCount = 1

The next executions of the code increases the assets in pickerController.didSelectAssets = { [unowned self] (assets: [DKAsset]) in with the previous asset or assets...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.