Skip to content

View controllers can be proxied more than once #5

Description

@sixten

After spending a couple of hours trying to track down an issue in my app where a link on one tab wouldn't take you to a different tab reliably, the proximate cause seems to be that -[NKNavigatorMap objectForURL:query:pattern:] could wrap a controller in more than one layer of NKViewControllerProxy.

Specifically, because the proxy forwards messages to the "real" object, this will evaluate to true:

if ([object isKindOfClass:[UIViewController class]] &&
  ![object isKindOfClass:[NKViewController class]]) {

I've added an additional clause that seems to have alleviated the issue:

if ([object isKindOfClass:[UIViewController class]] &&
  ![object isKindOfClass:[NKViewController class]] &&
  ![[object class] isSubclassOfClass:[NKViewControllerProxy class]]) {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions