Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Hotfix openURLFromButton: crash #463

Closed
wants to merge 1 commit into from

Conversation

jverkoey
Copy link
Contributor

When using openURLFromButton: we will likely be calling this from a
UIBarButtonItem object, which isn't a descendant of the UIView class.

We return the global navigator because there's no simple way
to determine the class from the bar button item. This is a
trade-off of ease-of-use over proper functionality here. If you want
to get a UIBarButtonItem to open a specific navigator, handle the
button tapped method yourself and get the correct navigator.

When using openURLFromButton: we will likely be calling this from a
UIBarButtonItem object, which isn't a descendant of the UIView class.

We return the global navigator because there's no simple way
to determine the class from the bar button item. This is a
trade-off of ease-of-use over proper functionality here. If you want
to get a UIBarButtonItem to open a specific navigator, handle the
button tapped method yourself and get the correct navigator.
@jverkoey
Copy link
Contributor Author

Added note to the header documenting this special case.

@jverkoey
Copy link
Contributor Author

Merge branch 'hotfix-openURLFromButton-crash'

Closed by 2ce7b12.

diederich pushed a commit that referenced this pull request Apr 17, 2011
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant