Skip to content

Instantly share code, notes, and snippets.

@i0sa
Created June 26, 2020 22:36
Show Gist options
  • Save i0sa/9850a3dea6045c6c8f0bdf1b4b13b079 to your computer and use it in GitHub Desktop.
Save i0sa/9850a3dea6045c6c8f0bdf1b4b13b079 to your computer and use it in GitHub Desktop.
%hook HomeViewController
-(void)viewDidLoad{
%orig;
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert"
message:@"This is an injected alert."
preferredStyle:UIAlertControllerStyleAlert];
[self presentViewController:alert animated:YES completion:nil];
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment