alassetslibrary

iOS rename/delete albums of photos

梦想与她 提交于 2019-12-11 17:55:36
问题 I am able to add photos and create albums from my app but I also want to be able to rename/delete albums and pictures in these albums. I know Apple have restrictions but is it possible at least to manage the albums and photos created by my application? (ALAsset and ALAssetLibrary) I understand I can't do anything to the already existing albums and photos in the Camera row and I am ok with this. 回答1: If you created an album, so that the album is editable , then the presence or absence of an

Video File thumbnail timestamp missing in ALAsset

為{幸葍}努か 提交于 2019-12-11 15:36:49
问题 hi i am getting all photos and videos thumbnails from ALAsset library. my code works fine i am getting photos and video thumbnail.but in video thumbnail missing Video icon and its time stamp. [assetImageView setImage:[UIImage imageWithCGImage:[self.asset thumbnail]]]; i am getting like above..i am using ELCImagePickerDemp API i need to get like this i am missing time and icon in lower right corner thumbnail. any help will be appreciated... THX 回答1: The assetslibrary thumbnail as you noticed

ALAssetsLibrary to get image from the custom album ios

。_饼干妹妹 提交于 2019-12-11 15:24:42
问题 I am using ALAssetsLibrary to save the image in customs Album in app. i am able to save the image but not able to get the image from the Album __weak ALAssetsLibrary *lib = self.library; [self.library addAssetsGroupAlbumWithName:@"MyAlbum" resultBlock:^(ALAssetsGroup *group) { ///checks if group previously created if(group == nil){ //enumerate albums [lib enumerateGroupsWithTypes:ALAssetsGroupAlbum usingBlock:^(ALAssetsGroup *g, BOOL *stop) { //if the album is equal to our album if ([[g

Need to create photo slider using photo library photos in iphone

匆匆过客 提交于 2019-12-11 12:56:11
问题 I want photo slider like whts app has. It should access all the pics or some of the pics from in build photo library and it should be scrollable using scroll view. I have tried with different photo viewer but everything has memory issue. So not sure if anyone has it's working solution. Really appreciate your help. Thank you, Ankita 回答1: This is working almost fine, but one small problem with backbord direction scrolling. Just try this out may be you can find some direction to go and may be

how can i write a NSData file as Video in to Photolibrary/SavedPhotosAlbum?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 12:28:56
问题 i have a Video file as NSData.how can i write the NSData file as Video in to Photolibrary/SavedPhotosAlbum? i done it with UIimage through the following code. i had a UiImage as myNsData (NSData) UIImage *viewImage = [UIImage imageWithData:myNsData]; ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; // Request to save the image to camera roll [library writeImageToSavedPhotosAlbum:[viewImage CGImage] orientation:(ALAssetOrientation)[viewImage imageOrientation] completionBlock:^(NSURL

ALAssetRepresentation not listing exact metadata details for all images

故事扮演 提交于 2019-12-11 08:58:19
问题 ALAssetRepresentation not listing the metadata details properly i,e when I try to get an image metadata, it returns only few details as below 2015-06-25 10:15:22.134 Phokl copy[1394:607] { ColorModel = RGB; DPIHeight = 72; DPIWidth = 72; Depth = 8; Orientation = 1; PixelHeight = 1250; PixelWidth = 834; "{Exif}" = { ColorSpace = 1; ComponentsConfiguration = ( 1, 2, 3, 0 ); ExifVersion = ( 2, 2, 1 ); FlashPixVersion = ( 1, 0 ); PixelXDimension = 834; PixelYDimension = 1250; SceneCaptureType = 0

UIImagePickerController Subview Alternative

浪尽此生 提交于 2019-12-11 06:59:13
问题 I am looking to integrate the ability to select images from the built in library into an iOS app. UIImagePickerController seems like the obvious choice. However, it only works as a modal view controller. For design reasons, the image selection in this app needs to be part of an UIViewController itself. After some research on the web and searching the StackOverflow archives, it seems I will need to implement my own Image Picker from scratch using ALAssetsLibrary to access the images stored on

Image loading with GCD receiving memory warning

假装没事ソ 提交于 2019-12-10 23:27:57
问题 I'm developing a photo gallery application using AssetsLibrary to load my device photos. When presenting a random image in another VC I've noticed the following : it takes about 1 or 2 seconds for my full res image to load on the imageView (way much longer than the native photosApp) and I also get from the log "Received memory warning" after loading a few images. If I set my representation to fullScreenImage the warnings stop but I don't want this. What must I change for a smooth performance

Share a video from asset library with AirDrop fails

允我心安 提交于 2019-12-10 22:29:37
问题 Using AirDrop, I would like to share a video from the asset library. In regards to AirDrop, the documentation says: When using this service, you can provide NSString, NSAttributedString, UIImage, ALAsset, and NSURL objects as data for the activity items. You may also specify NSURL objects whose contents use the assets-library scheme. You may also provide NSArray or NSDictionary objects that contain the listed data types. What I'm seeing thought is that if the data of the activity item is an

How to store assets with asynchronous enumerator in ALAssetsLibrary?

半世苍凉 提交于 2019-12-10 20:31:55
问题 I'm trying to pull all images from the photos library. The problem is that the method [ALAssetsGroup enumerateAssetsUsingBlock:] is asynchronous so by the time I'm trying to use the assets the enumerator has not started populating my assets array. Here's my code: NSMutableArray* photos = [[NSMutableArray alloc] init]; void (^assetEnumerator)(ALAsset *, NSUInteger, BOOL *) = ^(ALAsset *result, NSUInteger index, BOOL *stop) { if(result != nil) { if(![assetURLDictionaries containsObject:[result