I have a application with UIViewController "hierarchy" of this form:
Tab Bar Controller - View Controller 1 - View Controller 2 - View Controller 3 * View Controller 4 I am using the XCTest Framework to write test methods for my iOS application. View controller 3 is a UITableViewController. When the user selects a row in the table, view controller 4 is shown. I make a call to the application's window to get the root view controller, the tab bar controller for the application: // get reference to the tab bar controller let tabBarController = UIApplication.sharedApplication().delegate!.window!!.rootViewController! as! UITabBarController But that only gets me access to the three view controllers corresponding to each tab. I checked the number of child view controllers for the root view controller and the number is 3. Makes sense. I checked the number of child view controllers for the 3rd view controller...zero. The view controllers are all setup via IB. I still need to somehow get access to the 4th view controller for my test. Is there a programmatic way to reach the 4th view controller? _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com