Jump to content

Question about UIAlerts


Go to solution Solved by castix,

7 posts in this topic

Recommended Posts

Posted

So the other day I was working on a tweak and I added a alert message and when I go play the game to test it the tweak I never got the popup when I made the alert I only changed the title, body, and button do I have to add any thing else to it? Like the apps name ?

 

Also when I make a link button I put the alert in the tweak file and where does the other code go in the make?

 

If it's ok can some one show me an example what to add in my alert to work BC like I said I just changed the title body and button and were to add extra code If I have a link button ?

 

Thanks in advance

  • Solution
Posted

 

You can write it in your implementation file. When it's not a patcher add it with %new

 

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

{
    NSString *alert = [alertView buttonTitleAtIndex:buttonIndex];
    if([alert isEqualToString:@"Website"])
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];
    }
}
 
The class is MagicTimeIPhoneAppDelegate
Posted

You can write it in your implementation file. When it's not a patcher add it with %new

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

{
    NSString *alert = [alertView buttonTitleAtIndex:buttonIndex];
    if([alert isEqualToString:@"Website"])
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];
    }
}
 
The class is MagicTimeIPhoneAppDelegate

So how would I find the class if I was doing a diffrent app?

Posted

The class is likely marked with '...Delegate' You can also search functions like - (void)applicationsDidBecomeActive:(id)

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