Advertisement
Guest User

Untitled

a guest
May 5th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ```objectivec
  2. if ([selectorName isEqual:@"paste:"]) {
  3.             SEL act = %orig;
  4.             return act;
  5.             UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"PasteConfirm"
  6.                 message: @"Do you really want to paste this?" preferredStyle:UIAlertControllerStyleAlert];
  7.  
  8.             UIAlertAction *yesAction = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
  9.  
  10.             }];
  11.  
  12.             UIAlertAction *noAction = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
  13.  
  14.             }];
  15.  
  16.             // Add the alert actions
  17.             [alert addAction:yesAction];
  18.             [alert addAction:noAction];
  19.  
  20.             // Actually show the alert
  21.             UIViewController *viewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
  22.             [viewController presentViewController:alert animated:YES completion:nil];
  23.  
  24.         }``
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement