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
<?php | |
$array = [[1,2,[3]],4]; | |
function returnValues($someArray, &$newArray) { | |
foreach ($someArray as $value) { | |
echo "checking value: " . print_r($value, true) . "<br/>\n"; | |
if (is_array($value)) { | |
$values = returnValues($value, $newArray); | |
} | |
else { | |
echo "pushing value<br/>\n"; |
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
override func viewWillDisappear(animated:Bool) { | |
if let currentViewControllers = self.navigationController.viewControllers as? [UIViewController] { | |
if let found = find(currentViewControllers, self) { | |
// Do nothing if the current controller is still in the stack. This means we're going forward, not back | |
} | |
else { | |
self.performSegueWithIdentifier("unwindToLogin", sender:self) | |
} | |
} | |
super.viewWillDisappear(animated) |