Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```objectivec
- if ([selectorName isEqual:@"paste:"]) {
- SEL act = %orig;
- return act;
- UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"PasteConfirm"
- message: @"Do you really want to paste this?" preferredStyle:UIAlertControllerStyleAlert];
- UIAlertAction *yesAction = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
- }];
- UIAlertAction *noAction = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
- }];
- // Add the alert actions
- [alert addAction:yesAction];
- [alert addAction:noAction];
- // Actually show the alert
- UIViewController *viewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
- [viewController presentViewController:alert animated:YES completion:nil];
- }``
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement