Latest 0.0.2
Homepage https://github.com/Tuccuay/TUCAssetsHelper
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

[GitHub license]()
[CocoaPods]()
[CocoaPods]()

Save UIImage * to iOS devices Photos Library: [image tuc_saveToCameraRoll], well down!

TUCAssetsHelper using Photos Framework, is supporting iOS 8.0 and newer, not support iOS 7 (need ALAssetsLibrary).

Installation with CocoaPods

To integrate TUCAssetsHelper into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'TUCAssetsHelper'

Then, run the following command:

pod install

save to camera roll

[image tuc_saveToCameraRoll];

// using block
[image tuc_saveToCameraRollSuccess:^{
    NSLog(@"save to camera roll: success!");
} failure:^(TUCAssetsHelperAuthorizationStatus status) {
    NSLog(@"save to camera roll: Denied!");
}];

OR Swift

image.tuc_saveToCameraRoll()

image.tuc_saveToCameraRoll(success:{() in

}, failure: {(status) in 
    switch(satus) {
        case .denied:
            print("save to camera roll: success!")
            break
        case .restricted:
            print("save to camera roll: Denied!")
    }
})

save to app bundle name album

app bundle name -> Info.plist -> Bundle Name(CFBundleName)

[image tuc_saveToAlbumWithAppBundleName];

[image tuc_saveToAlbumWithAppBundleNameSuccess:^{
    NSLog(@"save to app bundle name album: success!");
} failure:^(TUCAssetsHelperAuthorizationStatus status) {
    NSLog(@"save to app bundle name album: Denied!");
}];

OR Swift

image.tuc_saveToAlbumWithAppBundleName()

image.tuc_saveToAlbumWithAppBundleName(success:{() in

}, failure: {(status) in 
    switch(satus) {
        case .denied:
            print("save to camera roll: success!")
            break
        case .restricted:
            print("save to camera roll: Denied!")
    }
})

save to app localized name album

app localized name -> InfoPlist.string -> CFBundleName

[image tuc_saveToAlbumWithAppLocalizedName];

[image tuc_saveToAlbumWithAppLocalizedNameSuccess:^{
    NSLog(@"save to app localized name album: success!");
} failure:^(TUCAssetsHelperAuthorizationStatus status) {
    NSLog(@"save to app localized name album: Denied!");
}];

OR Swift

image.tuc_saveToAlbumWithAppLocalizedName()

image.tuc_saveToAlbumWithAppLocalizedName(success:{() in

}, failure: {(status) in 
    switch(satus) {
        case .denied:
            print("save to camera roll: success!")
            break
        case .restricted:
            print("save to camera roll: Denied!")
    }
})

save to custom name album

[image tuc_saveToAlbumWithAlbumName:@"any album name here"];

[self.image tuc_saveToAlbumWithAlbumName:@"custom album name" success:^{
    NSLog(@"save to custom name album: success!");
} failure:^(TUCAssetsHelperAuthorizationStatus status) {
    NSLog(@"save to custom name album: Denied!");
}];

OR Swift

image.tuc_saveTo(album:"any album name here")

image.tuc_saveTo(album:"any album name here", 
    success:{() in

    },
    failure: {(status) in 
    switch(satus) {
        case .denied:
            print("save to camera roll: success!")
            break
        case .restricted:
            print("save to camera roll: Denied!")
    }
})

License

Mantle is released under the MIT license. See
LICENSE.

More Info

Have a question? Please open an issue!

Latest podspec

{
    "name": "TUCAssetsHelper",
    "version": "0.0.2",
    "summary": "Save UIImage *image to iOS Photos Library, use PHPhotoLibrary framework.",
    "homepage": "https://github.com/Tuccuay/TUCAssetsHelper",
    "license": "MIT",
    "authors": {
        "Tuccuay": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Tuccuay/TUCAssetsHelper.git",
        "tag": "0.0.2"
    },
    "source_files": "TUCAssetsHelper",
    "public_header_files": "TUCAssetsHelper/UIImage+TUCAssetsHelper.h",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This