Jump to content

2 posts in this topic

Recommended Posts

Posted
Hai... I run this code on ios 10. but when I call
 
optionsPresented = YES;

 

[self saveScreenshot: YES];
 
safemode directly.


complate code : 
 
%hook SBScreenshotManager

	-(void)saveScreenshots
	{
		if(optionsPresented == NO)
		{
			UIAlertView *options = [[UIAlertView alloc] init];
			[options setTitle:@"Screenshot Options"];
			[options setMessage:@"What do you want to do?"];
			[options setDelegate:self];
			[options addButtonWithTitle:@"Save Screenshot"];
			[options addButtonWithTitle:@"Open Screenshot"];
			[options addButtonWithTitle:@"Discard Screenshot"];
			[options show];
			[options release];
		}
		else
		{
			%orig;
			optionsPresented = NO;
		}
	}

	%new
	- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
	if (buttonIndex == 0)
	{
		optionsPresented = YES;
		[self saveScreenshot:YES];
	}
	else if (buttonIndex == 1)
	{
		//optionsPresented = YES;
		//[self saveScreenshot:YES];
		//OPEN PHOTO APP AND OPEN MOST RECENT FILE
	}
	else if (buttonIndex == 2)
	{
		return;
	}
}

%end

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines