Aaaand now it's working perfectly.
Hope someone finds that little chunk of code useful.
Cheers,
Alex Zavatone
On Jun 11, 2015, at 1:48 PM, Alex Zavatone wrote:
> I'm back into my modular design phase where I build one part of the iOS
> application in one storyboard, then another part in another and just do a
> presentViewController with the root view or nav controller from the
> storyboard that contains it.
>
> This works almost as expected except for one thing.
>
> After the view controller is presented from the other storyboard, the first
> tap on the scene is always ignored. It's like the first tap brings the new
> view into focus and then once it's in focus, every other tap and gesture
> works as expected, just not the first one.
>
> If it matters. I'm calling the method to push a new viewController in a new
> storyboard from the viewDidAppear of the iOS 8 app's first viewController.
>
> Here's the method that I've got doing it and it works great besides that one
> issue.
>
> Any insight into this would be great. Thanks much
>
> - (void)launchModuleInOtherStoryboard {
>
> // Load a separate storyboard from the bundle to handle this.
>
> NSString *storyboardName = @"Module"; // If we need to specify the device
> idiom at the end of the name, we can.
> UIStoryboard *accountProvisioningStoryboard = [UIStoryboard
> storyboardWithName:storyboardName bundle:nil];
>
> // To push a new set of scenes with a new navigation Controller, it is done
> like this:
> // Declare the identifiers of the nav controller and view controller that
> start the storyboard
> // Don't use the initialViewController UIStoryboard method
> NSString *initialNavControllerIdentifier = @"Nav Controller";
> NSString *initialViewControllerIdentifier = @"Marketing Material";
>
> UINavigationController *accountProvisioningNC =
> [accountProvisioningStoryboard
> instantiateViewControllerWithIdentifier:initialNavControllerIdentifier];
> UIViewController *accountProvisioningVC = [accountProvisioningStoryboard
> instantiateViewControllerWithIdentifier:initialViewControllerIdentifier];
>
> [accountProvisioningNC pushViewController:accountProvisioningVC
> animated:NO];
>
> [accountProvisioningNC
> setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
>
> // Present the view controller;
> [self presentViewController:accountProvisioningNC animated:YES
> completion:NULL];
>
> }
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>
> This email sent to [email protected]
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]