Browse Source

Fix Profile Picture Saving

& Update to 1.0.2
tags/1.0.2
Matthew Matter 7 years ago
parent
commit
3415c0f6f7
5 changed files with 66 additions and 3 deletions
  1. +4
    -1
      README.md
  2. +61
    -1
      Tweak.xm
  3. +1
    -1
      control
  4. BIN
      gg.gh0stbyte.bkstg_1.0.0_iphoneos-arm.deb
  5. BIN
      gg.gh0stbyte.bkstg_1.0.2_iphoneos-arm.deb

+ 4
- 1
README.md View File



## History ## History


#### 1.0.2
* Fix ability to save Profile Pictures

#### 1.0.1 #### 1.0.1
* Fix ability to save Poll images * Fix ability to save Poll images




## Credits ## Credits


Made by Gh0stByte
Made by [Gh0stByte](http://twitter.com/Gh0stByte)


Suggestion by /u/marcelre Suggestion by /u/marcelre



+ 61
- 1
Tweak.xm View File

@property (assign, nonatomic) FLImageView *photoView; @property (assign, nonatomic) FLImageView *photoView;
@end @end


@interface FLFullScreenPhotoViewController : UIViewController
@property (assign, nonatomic) UIImageView *imageView;
@end

%hook FLHubPhotoViewController %hook FLHubPhotoViewController


-(void)viewDidLoad -(void)viewDidLoad


%end %end



%hook FLFullScreenPhotoViewController

-(void)viewDidLoad
{
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleLongPress:)];
longPress.minimumPressDuration = 1.5;
[self.view addGestureRecognizer:longPress];
%orig;
}

%new
-(void)handleLongPress:(UILongPressGestureRecognizer *)sender
{
UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];

[actionSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {

// Cancel button tappped.
[self dismissViewControllerAnimated:YES completion:^{
}];
}]];

[actionSheet addAction:[UIAlertAction actionWithTitle:@"Save Image" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

UIImage *snapshot = self.imageView.image;

[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^
{
PHAssetChangeRequest *changeRequest = [PHAssetChangeRequest creationRequestForAssetFromImage:snapshot];
changeRequest.creationDate = [NSDate date];
}
completionHandler:^(BOOL success, NSError *error)
{
if (success)
{
NSLog(@"successfully saved");
}
else
{
NSLog(@"error saving to photos: %@", error);
}
}];

[self dismissViewControllerAnimated:YES completion:^{
}];
}]];

// Present action sheet.
[self presentViewController:actionSheet animated:YES completion:nil];
}

%end

// IGNORE ABOVE. SAVES IMAGES // IGNORE ABOVE. SAVES IMAGES
//FLAVPlayerLayerView //FLAVPlayerLayerView
//FLHubVideoCollection //FLHubVideoCollection
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:actionSheet animated:YES completion:nil]; [[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:actionSheet animated:YES completion:nil];
} }


%end
%end

+ 1
- 1
control View File

Package: gg.gh0stbyte.bkstg Package: gg.gh0stbyte.bkstg
Name: Bkstg Plus Name: Bkstg Plus
Depends: mobilesubstrate Depends: mobilesubstrate
Version: 1.0.0
Version: 1.0.2
Architecture: iphoneos-arm Architecture: iphoneos-arm
Description: Save Media from Bkstg Description: Save Media from Bkstg
Download photos & videos using this tweak. This tweak was suggested by /u/marcelre. Download photos & videos using this tweak. This tweak was suggested by /u/marcelre.

BIN
gg.gh0stbyte.bkstg_1.0.0_iphoneos-arm.deb View File


BIN
gg.gh0stbyte.bkstg_1.0.2_iphoneos-arm.deb View File


Loading…
Cancel
Save