Giter Club home page Giter Club logo

ctassetspickercontroller's People

Contributors

1and2papa avatar akcbryant avatar bawn avatar bluevirusx avatar chrisze avatar fatalaa avatar giladno avatar jneiluj avatar kevinwo avatar krusek avatar m1entus avatar rabiakoca avatar remylivewall avatar sadiq81 avatar sega-zero 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  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

ctassetspickercontroller's Issues

If no photo selected it will crash.

If no photo has been selected and I pressed Done button , it will crashed.

I think it is better to make "Done" button not enabled until the minimum number of Photos is met and then activate "Done".

Maybe also make "Cancel" instead of "Done" before the minimum is met.

Count of Images

Can I select more than 10 image?

It didn't help:

  • (BOOL)assetsPickerController:(CTAssetsPickerController *)picker shouldSelectAsset:(ALAsset *)asset
    {
    if (picker.selectedAssets.count >= 30)

navigationbar wont change

What ever i do i cant seem to change the navigation bar color?

Where do i need to put the code for that?

Color, NSLocalizedString

Hello, I suggest to use a separate file for the location eg. CTAssetsPicketController.string and add a property for the colors used (fonts and buttons).

thanks for you work!
m.

The global text appearance for the bottom toolbar is being ignored.

When using a global setting for the text appearance in UIBarButtonItem, the bottom toolbar ignores the setting. For example when setting:

[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10], NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal];

The bottom toolbar will still be black, due to these lines of code.

All images not shown

I am using this control mostly successfully, however, I can only see the photos which are in "Albums", I don't see the Photos which are in "Photos".

The control is only showing me "Recently Added", "Favorites", "Panoramas", "Videos", "Bursts". The total # of photos in these albums is about 150. However, I have close to 3,000 photos on my phone and they are accessible from the native Photos app using the "Moments" tab.

Could it be that the missing photos are not associated with an album?

Add showing default content

Allows the picker to initially show the content of default assets group (e.g. Camera roll) instead of a list of albums

Refactor into separate files

While you may find having 10 different classes in one file cute, it makes for a hell of a time trying to make any updates or changes.

Please refactor this into separate classes for the love of god.

Feature request: Radio mode support

If we restrict the user can select only one, is there no need to display the selection markers and the Done button?
We should immediately dismiss the controller and callback when user selects one picture or video.
Whether it would be better to do so?
So I mean, this library does not seem to support the radio mode.

Hiding status bar.

Using the generic iOS7 methods to hide the status bar, it shows back up.

How would I hide it in the full size image view?

UPDATE:
Ok I found the code for the hiding actions, but it doesn't appear to be working on iOS 7.

I can get it to hide, but it just shows right back up.

Remove videos from camera roll!

Hi,

At first, thank you for making the CTAssetsPickerController! ;)

I want to disable the selection of videos in my camera roll! I already tried to remove the shouldEnableAssetForSelection boolean and return the shouldEnableAssetForSelection to FALSE, but nothing seems to work.

Could you explain to me why these solutions doesn't work?!

Thankyou!

Didn't build in Xcode 6 beta 2

I've add CTAssetsPickerController in my Project. And i have a few errors in CTAssetsPickerConstants.h:

/CTAssetsPickerController/CTAssetsPickerConstants.h:29:8: Unknown type name 'CGFloat'

/CTAssetsPickerController/CTAssetsPickerConstants.h:29:16: Expected identifier or '('

/CTAssetsPickerController/CTAssetsPickerConstants.h:31:15: Expected identifier or '('

Fix time title

@ NSDate+TimeInterval.m line:53

change:
NSInteger roundedSeconds = lround(timeInterval - (components.hour * 60) - (components.minute * 60 * 60));
To:
NSInteger roundedSeconds = lround(timeInterval - (components.hour * 60 * 60) - (components.minute * 60));

I don't Pull Request.

Crash when running in iOS < 7.0

When selecting an album after the album after all the albums are shown in iOS < 7.0 (in my case was using an iPhone 5 with iOS 6.1.3) there is a crash in the CTAssetsPickerController.m in line 907, because using the selector sizeWithAttributes:

I checked and noticed you are using this macro:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
but actually that macro is not validating if the current version of the iOS is 7 or lower, i think you guys should use __IPHONE_OS_VERSION_MIN_REQUIRED

Optimise for 64bit processor

Update data type for optimising 64bit processor. Experiment code attached. 526c479

Tester required. Anyone have iPhone 5s please help to verify.

Take picture

Hey!

It would be awesome to choose the camera as a source to pick a photo or shoot a video. Any plans on including such a feature?

-- HS

Video selection

Hello,
First of all good work!
I am having a small issue:
could you please tell me why it is not possible to select some videos? (white overlay on top of them)
Thanks

Check image not displaying

For some reason the checkmark image is not displaying when I select an asset. I'm using this controller in a titanium module. iOS development is very new to me, so it's most likely a noob issue, just looking for some guidance.
screen shot 2014-11-06 at 10 12 39 am

ALErrorInvalidProperty issue

Hi,
I use cocoapods pod 'CTAssetsPickerController', '~> 1.2.0'

when i open to choose photos, it crash at line 752 in "CTAssetsPickerController.m"

self.title = [NSDate timeDescriptionOfTimeInterval:[[asset valueForProperty:ALAssetPropertyDuration] doubleValue]];

i saw [asset valueForProperty:ALAssetPropertyDuration] return ALErrorInvalidProperty, not a string can parse to double.

Please help!

NavigationBar not showing

I have a viewcontroller embedded in a navigationcontroller. When I call presentViewController on the picker controller, the navigationbar doesn't show up. I'm using xcode 5. I'm using this code:

CTAssetsPickerController *picker = [[CTAssetsPickerController alloc] init];
picker.delegate = self;
picker.showsCancelButton = YES;
[self presentViewController:picker animated:YES completion:nil];

filtering videos by minimum duration

I need to extend this class to only include videos which have a minimum duration. I'd figured I could simply extend ALAssetsFilter but it doesn't seem that Apple exposes the interface to the point that you could do that....

Rather than add explicit minimum duration, I thought about maybe adding some sort of predicate block that could be assigned to the asset picker providing arbitrary filtering. Any better ideas?

asset counts accumulate between runs if you don't destroy the picker

I'm keeping the picker around between selections, so the user doesn't have to navigate back and forth to the album multiple times. The item count (5 videos, etc) doesn't reset between appears, unless you destroy and re-create the picker, which of course loses the context.

Under compiling in iOS 7.1 SDK list of Albums is squished into one line.

Xcode: Version 5.1
iOS SDK : 7.1

CTAssetsPickerController *picker = [[CTAssetsPickerController alloc] init];
        picker.delegate = self;
        [picker setMaximumNumberOfSelection:10];

    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        [self presentViewController:picker animated:YES completion:NULL];
    } else {
        self.popOverVC          = [[UIPopoverController alloc] initWithContentViewController:picker];
        self.popOverVC.delegate = self;
        [self.popOverVC presentPopoverFromRect:sender.bounds inView:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

    }

screen shot 2014-03-13 at 18 44 44

Make toggle selection

This is a feature request.

I have set my maximum number of selection is to one so I only can select one photo ,but I wanted to toggle selection If I have already selected one photo and wanted to click on another to mark the new as selected and remove selection from older one.

Blank assets collection view

The code works on both 6.1 and 7.0 simulator. But for the iOS 7 device(iPhone 5s), it only display a blank collection view after I click the add button in the demo project. (same situation as in my on project). But it do work on an iPhone 4 with iOS 6.1.3. Would you help to figure out what's wrong with it?

would it be possible to use it in ios6 and under?

I know you specifically mentioned we have to use the old version.

Thing is, only handful of users of my app need the PickerController to select images.
Most users don't need to select images at all.

Would it be possible to include the library in a way such that only ios7 user is allowed to use the picker?

if(ios.version>= 7) { show button for picker controller. }

Proposal

Instead of "%d Photos Selected" show "%d of %d", where last parameter is total photos count in curent folder.

iOS7 Deprecations

Hi,

First of all, thank you for this great pod!
When using it in a iOS7 project there are some deprecation warnings, namely:

Pods/CTAssetsPickerController/CTAssetsPickerController/CTAssetsPickerController.m:144:19: 'setContentSizeForViewInPopover:' is deprecated: first deprecated in iOS 7.0 - Use UIViewController.preferredContentSize instead.
Pods/CTAssetsPickerController/CTAssetsPickerController/CTAssetsPickerController.m:175:19: 'setContentSizeForViewInPopover:' is deprecated: first deprecated in iOS 7.0 - Use UIViewController.preferredContentSize instead.
Pods/CTAssetsPickerController/CTAssetsPickerController/CTAssetsPickerController.m:540:19: 'setContentSizeForViewInPopover:' is deprecated: first deprecated in iOS 7.0 - Use UIViewController.preferredContentSize instead.
Pods/CTAssetsPickerController/CTAssetsPickerController/CTAssetsPickerController.m:861:47: 'sizeWithFont:' is deprecated: first deprecated in iOS 7.0 - Use -sizeWithAttributes:
Pods/CTAssetsPickerController/CTAssetsPickerController/CTAssetsPickerController.m:863:21: 'drawAtPoint:forWidth:withFont:fontSize:lineBreakMode:baselineAdjustment:' is deprecated: first deprecated in iOS 7.0 - Use -drawInRect:withAttributes:

I think these would be quite easy to fix. The hardest part is keeping iOS6 compatibility I guess. Thoughts?

Regards, Miguel Cabeça

Feature request: add AirPlay picker

It would be great if the CTAssetScrollView contained an AirPlay picker.

I believe this should be fairly easy to add with an MPVolumeView

I tried hacking in one myself, but I was certain of the best approach in keeping with your architecture.

Hold to preview feature

Would love to hold on an item in the item selection view (checked and unchecked) for 1.5seconds and it popup with a fullscreen preview and done button for the item be it a photo or video for playback.

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.