Skip to content
Guest Big Announcement

Question about UIAlerts

Featured Replies

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

Solved by castix

  • Solution

 

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
  • Author

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?

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

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.