0

如何检测实际视图是来自故事板中的源视图控制器还是目标视图控制器?

4

1 回答 1

0

如果我理解正确,您可以questionedView这样测试:

    if( [questionedView isDescendantOfView:[storyboardSegue sourceViewController].view] )
    {
      // view is from sourceViewController
    }

    if( [questionedView isDescendantOfView:[storyboardSegue destinationViewController].view] )
    {
      // view is from destinationViewController
    }
于 2012-12-23T18:45:17.590 回答