UIPopoverPresentationController should have a non-nil sourceView or barButtonItem set before the presentation occurs on iOS 9

You can create a popover presentation controller like this also and it may work – (IBAction)showPopup:(UIButton *)sender { ViewController *contentViewController = [[ViewController alloc] init]; contentViewController.preferredContentSize = CGSizeMake(200, 200); contentViewController.modalPresentationStyle = UIModalPresentationPopover; UIPopoverPresentationController *popoverpresentationController = contentViewController.popoverPresentationController; popoverpresentationController.delegate = self; popoverpresentationController.permittedArrowDirections = UIPopoverArrowDirectionUp; popoverpresentationController.sourceRect = sender.bounds; popoverpresentationController.sourceView = sender; [self presentViewController:contentViewController animated: YES completion: nil]; }

Custom smaller Detents in UISheetPresentationController?

For iOS 16+ Swift – custom(identifier:resolver:) ObjC – customDetentWithIdentifier:resolver: For iOS 15 : Use +[UISheetPresentationControllerDetent _detentWithIdentifier:constant:]. It’s a private method. Sample Summary: UIKitCore`+[UISheetPresentationControllerDetent _detentWithIdentifier:constant:] Address: UIKitCore[0x00000001838d50fc] (UIKitCore.__TEXT.__text + 17876312)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)