whyceewhite / CarLess

Logging commuting trips completed using transit or pedestrian modes of transportation.
0 stars 0 forks source link

Can viewControllerForUnwindSegueAction be removed once iOS 9 is in place #19

Closed whyceewhite closed 9 years ago

whyceewhite commented 9 years ago

In the MainViewController class a viewControllerForUnwindSegueAction is implemented because of a Swift bug where unwinding did not occur for tabbed controller views. According to this SO post, the unwinding should working in iOS 9. Once Swift and Xcode are updated in issue #18, check whether or not this superfluous override may be removed.

whyceewhite commented 9 years ago

The following block was removed as the segue works now in the upgraded swift/xcode versions.

/*
 * This override is needed to get the unwind segues to properly work.
 * See http://stackoverflow.com/questions/25654941/unwind-segue-not-working-in-ios-8
 */
override func viewControllerForUnwindSegueAction(action: Selector, fromViewController: UIViewController, withSender sender: AnyObject?) -> UIViewController? {

    return self.selectedViewController?.viewControllerForUnwindSegueAction(action, fromViewController: fromViewController, withSender: sender)
}
whyceewhite commented 9 years ago

Commit 96878d2