Created
August 27, 2013 07:15
-
-
Save HHuckebein/6350559 to your computer and use it in GitHub Desktop.
UIViewController category to for TDD manually triggered segues.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const char *storyboardSegueKey = "TestAssociatedStoryboardKey"; | |
static const char *senderKey = "TestAssociatedSenderKey"; | |
@implementation YourViewController (Testing) | |
- (void)documentsBrowserTest_prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
objc_setAssociatedObject(self, storyboardSegueKey, segue, OBJC_ASSOCIATION_RETAIN); | |
objc_setAssociatedObject(self, senderKey, sender, OBJC_ASSOCIATION_RETAIN); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment