Skip to content

Instantly share code, notes, and snippets.

@NSExceptional
Last active July 27, 2017 04:21
Show Gist options
  • Save NSExceptional/bda8df73628f71e5a2a0522a83a92e07 to your computer and use it in GitHub Desktop.
Save NSExceptional/bda8df73628f71e5a2a0522a83a92e07 to your computer and use it in GitHub Desktop.
An iOS tweak to hide hidden photos everywhere except in the Hiddel album.
//
// Tweak.xm
// TrueHidePhotos
//
// Created by Tanner Bennett on 2017-07-02
// Copyright © 2017 Tanner Bennett. All rights reserved.
//
#import <Photos/Photos.h>
%hook PHAsset
+ (PHFetchResult<PHAsset *> *)fetchAssetsInAssetCollection:(PHAssetCollection *)assetCollection
options:(PHFetchOptions *)options {
options.includeHiddenAssets = NO;
return %orig;
}
+ (PHFetchResult<PHAsset *> *)fetchKeyAssetsInAssetCollection:(PHAssetCollection *)assetCollection
options:(PHFetchOptions *)options {
options.includeHiddenAssets = NO;
return %orig;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment