Issue with UIPopoverPresentationController position drifting on iPadOS 26.0

After upgrading my iPad to iPadOS 26.0, I noticed that when using UIPopoverPresentationController, the popover no longer appears at the expected position. According to the debug logs, the position of the arrow indicator is printed correctly. Interestingly, the issue can be fixed temporarily by switching between portrait and landscape orientations. Could you please help me resolve this issue?

Answered by DTS Engineer in 861792022

We need more information to understand the issue you described, please attach a focused sample project that reproduces the issue. See creating Apple Developer Forums posts, see tips on writing forums posts.

In iOS 26 standard components like bars, sheets, popovers, adopt liquid glass and have a new visual refresh, please see Adopting Liquid Glass.

Accepted Answer

We need more information to understand the issue you described, please attach a focused sample project that reproduces the issue. See creating Apple Developer Forums posts, see tips on writing forums posts.

In iOS 26 standard components like bars, sheets, popovers, adopt liquid glass and have a new visual refresh, please see Adopting Liquid Glass.

if (ipad) { if (Button) { UIView *view = (UIView *)Button; sheet.modalPresentationStyle = UIModalPresentationPopover; UIPopoverPresentationController *popover = [sheet popoverPresentationController]; popover.sourceView = view; popover.backgroundColor = [JSThemeManager colorWithID:KKBackground_04];

            if (view.tag == 1000) {
                popover.permittedArrowDirections = UIPopoverArrowDirectionUp;
            } else {
                popover.sourceRect = CGRectMake(view.bounds.origin.x,
                                                view.bounds.origin.y,
                                                view.bounds.size.width + 3,
                                                view.bounds.size.height);
                popover.permittedArrowDirections = UIPopoverArrowDirectionUnknown;
            }
            
            CGFloat height = number * 72 + 32;
            
            CGFloat width = 219 + 35; // 默认
            
            sheet.preferredContentSize = CGSizeMake(width, height);
        } else {
            
            sheet.modalPresentationStyle = UIModalPresentationFormSheet;
        }
    }
    
    [ViewController presentViewController:sheet animated:YES completion:nil];
Issue with UIPopoverPresentationController position drifting on iPadOS 26.0
 
 
Q