Jump to content

UIAlertView Pop Up doesn't want to work


Go to solution Solved by Rook,

3 posts in this topic

Recommended Posts

Posted

I am trying to insert a UIAlert pop up. I hooked it to applicationDidBecomeActive and when I compile it, there are no errors. The pop up appears but after I press the button for it to go away, it just leaves a black screen with a status bar.

 

My makefile has :

NAMEHERE_FRAMEWORKS = UIKit

 

My Tweak.xm has:

#import <UIKit/UIKit.h>

 

and this is the code in Tweak.xm:

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)argument {

UIAlertView *alert = [[uIAlertView alloc] initWithTitle:@"Tittle" message:@"A message here" delegate:nil cancelButtonTitle:@"Thanks!" otherButtonTitles:nil];

[alert show];

[alert release];

}

%end

 

I'm on iOS 9.3.3

  • Solution
Posted

Add this

return %orig;

After

[alert release];
return %orig;

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