JoeFryer / JDFTooltips

A simple library for showing tooltip-like popups on iOS
MIT License
189 stars 42 forks source link

Tooltips don't show when using self.tooltipManager.showsBackdropView = YES; #6

Closed LaChrome closed 9 years ago

LaChrome commented 9 years ago

Hi,

I'm unable to get tooltips to show when using the line: "self.tooltipManager.showsBackdropView = YES;"

If I remove that line, then the tooltips appear, but without the backdrop, and they have to be individually pressed to dismiss them (instead of being able to tap anywhere on the screen).

The configuration is straight forward, as I copied the code from the example.

Possible issue with iOS9?

Thanks.

I've also found that the line: [self.tooltipManager setDismissOnTouchForAllTooltips:NO];

doesn't change the behaviour of the tooltips at all (they still dismiss when touched).

Am I doing something obviously wrong?

Thanks.

Chris

LaChrome commented 9 years ago

For some reason (I haven't dug into why yet), but the line: UIWindow *window = self.hostView.window;

Always returns NULL, so the backdrop doesn't show.

This happens when you initialize the JDFSequentialTooltipManager in the "ViewDidLoad" function of the view controller.

To fix the issue, I moved the JDFSequentialTooltipManager initialization into the "ViewDidAppear" function, which solved the issue. showBackdropView now works, and the line "UIWindow *window = self.hostView.window;" no longer returns null.

JoeFryer commented 9 years ago

Hi @Apptation,

Thanks for reporting this stuff.

So:

Thanks Again!