Hello,
I've been trying to figure this thing for a while now, but I've not able to find any resolution. I've a UIAlertController object presented as UIAlertControllerStyleActionSheet.
It's fairly straightforward code:
UIAlertController *listSheet = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTableInBundle(@"Please Select a Report", nil, [LDKLocalizationTool currentBundle], @"Chart report selector") message:nil preferredStyle:UIAlertControllerStyleActionSheet];
[self.charts enumerateObjectsUsingBlock:^(ChartDefinition *chart, NSUInteger idx, BOOL *stop) {
UIAlertAction *anAction = [UIAlertAction actionWithTitle:chart.graphLabel style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// handler logic
}];
[listSheet addAction:anAction];
}];
// Set the anchor point for the AlertController
UIPopoverPresentationController *popoverPresenter = [listSheet popoverPresentationController];
if (popoverPresenter) {
popoverPresenter.sourceView = sender;
popoverPresenter.sourceRect = [sender bounds];
}
// Display the AlertController
[self presentViewController:listSheet animated:YES completion:nil];
However, when presented, the action sheet shows up as shown in the attached screenshot.
There are no autoLayout constraints or anything like that to cause issues with layout.
I'm not sure why it's causing this issue. Any suggestions or help is much appreciated!
iPadOS version: 18.4
Xcode version: 16.3
M4 Mac with macOS 15.5