Hotfix openURLFromButton: crash #463

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@jverkoey

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 jverkoey [UINavigator] Check the view class in navigatorForView.
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.
1262670
@jverkoey

Added note to the header documenting this special case.

@jverkoey

Merge branch 'hotfix-openURLFromButton-crash'

Closed by 2ce7b12.

@diederich diederich pushed a commit that referenced this pull request Apr 17, 2011
@jverkoey jverkoey Merge branch 'hotfix-openURLFromButton-crash'
Closes #463.
2ce7b12
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment