when using Tips with UIKit, presenting TipUIPopoverViewController disables all the buttons from the presenting screen.
I assume this is the expected behaviour but is there a way to disable it? I would like the button that the tip is pointing to to be still enabled. Otherwise user has to tap on it twice which is not ideal.
Method checking for tip's eligibility.
private extension MenuViewController {
func activateTips() {
Task { @MainActor [weak self] in
guard let self else {
return
}
for await shouldDisplay in createMapTip.shouldDisplayUpdates {
if shouldDisplay {
let controller = TipUIPopoverViewController(createMapTip, sourceItem: createMapButton) { [weak self] action in
if action.id == "LearnAboutMaps" {
if self?.presentedViewController is TipUIPopoverViewController {
self?.dismiss(animated: true) {
self?.createMapTip.invalidate(reason: .actionPerformed)
self?.viewModel.handle(.didTapLearnMoreAboutMaps)
}
}
}
}
present(controller, animated: true)
}
else if presentedViewController is TipUIPopoverViewController {
dismiss(animated: true)
}
}
}
}
}
Try setting the passthroughViews property on TipUIPopoverViewController's popoverPresentationController
Include the view controller's view that you are presenting in the array.
tipUIPopoverViewController.popoverPresentationController.passthroughViews = @[self.view];
//then present it.
Unfortunately I can't test this myself because even though TipUIPopoverViewController is a view controller subclass for whatever reason they decided not to include a header file that can be imported into Objective-C which is just bizarre.