Properly configure action sheets for iPads
This commit is contained in:
parent
1ce677a1ce
commit
20c2f91b3c
|
@ -243,6 +243,9 @@ extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void
|
|||
[alert addAction:saveAction];
|
||||
[alert addAction:saveAndRunAction];
|
||||
[alert addAction:cancelAction];
|
||||
|
||||
alert.popoverPresentationController.sourceView = self.doneButton;
|
||||
alert.popoverPresentationController.sourceRect = self.doneButton.bounds;
|
||||
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
|
|
@ -116,6 +116,8 @@ extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void
|
|||
[deleteAlert addAction:deleteAction];
|
||||
[deleteAlert addAction:cancelAction];
|
||||
|
||||
deleteAlert.popoverPresentationController.barButtonItem = sender;
|
||||
|
||||
[self presentViewController:deleteAlert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
|
|
@ -139,6 +139,11 @@ extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void
|
|||
[deleteAlert addAction:deleteAction];
|
||||
[deleteAlert addAction:cancelAction];
|
||||
|
||||
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
|
||||
deleteAlert.popoverPresentationController.sourceView = cell;
|
||||
deleteAlert.popoverPresentationController.sourceRect = cell.bounds;
|
||||
|
||||
[self presentViewController:deleteAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,6 +259,11 @@ extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void
|
|||
|
||||
[deleteAlert addAction:deleteAction];
|
||||
[deleteAlert addAction:cancelAction];
|
||||
|
||||
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
|
||||
deleteAlert.popoverPresentationController.sourceView = cell;
|
||||
deleteAlert.popoverPresentationController.sourceRect = cell.bounds;
|
||||
|
||||
[self presentViewController:deleteAlert animated:YES completion:nil];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue